Skip to content

Instantly share code, notes, and snippets.

@ualmtorres
Created September 19, 2020 18:02
Show Gist options
  • Save ualmtorres/c6a305b6bc4c62e9cfbe009c534d70e4 to your computer and use it in GitHub Desktop.
Save ualmtorres/c6a305b6bc4c62e9cfbe009c534d70e4 to your computer and use it in GitHub Desktop.
Planteamiento Servicio
import { Injectable } from '@nestjs/common';
@Injectable()
export class BooksService {
findAll(): any {
return 'findAll funcionando';
}
findBook(bookId: string): any {
return `findBook funcionando con ${bookId}`;
}
createBook(newBook: any): any {
return `createBook funcionando con ${JSON.stringify(newBook)}`;
}
deleteBook(bookId: string): any {
return `deleteBook funcionando con ${bookId}`;
}
updateBook(bookId: string, newBook: any): any {
return `updateBook funcionando con ${bookId} y ${JSON.stringify(newBook)}`;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment