import PostLike from '../infra/typeorm/entities/PostLike' ; import IPostLikesRepository from '../repositories/IPostLikesRepository' ; import { inject , injectable } from 'tsyringe' ; @ injectable ( ) class ShowPostService { constructor ( @ inject ( 'PostLikesRepository' ) private postsLikesRepository ) { } public async execute ( postId ) { const likes = await this . postsLikesRepository . findByPost ( postId ) ; return likes ; } } export default ShowPostService ;