import LibraryItem from '../infra/typeorm/entities/LibraryItem' ; import ILibraryRepository from '../repositories/ILibraryRepository' ; import { inject , injectable } from 'tsyringe' ; @ injectable ( ) class ShowLibraryItemsService { constructor ( @ inject ( 'LibraryRepository' ) private libraryRepository ) { } public async execute ( id ) { const libraryItem = await this . libraryRepository . findById ( id ) ; return libraryItem ; } } export default ShowLibraryItemsService ;