import Author from '../infra/typeorm/entities/Author' ; import IAuthorsRepository from '../repositories/IAuthorsRepository' ; import { inject , injectable } from 'tsyringe' ; @ injectable ( ) class ShowAuthorService { constructor ( @ inject ( 'AuthorsRepository' ) private authorsService ) { } public async execute ( username ) { const author = await this . authorsService . findByUsername ( username ) ; return author ; } } export default ShowAuthorService ;