Created
April 15, 2021 18:46
-
-
Save saeedhajinasiri/47f8d81c899ae6c0be25f3107eeb5d75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable, HttpException } from '@nestjs/common'; | |
import { BOOKS } from '../mocks/books.mock'; | |
@Injectable() | |
export class BooksService { | |
books = BOOKS; | |
... | |
addBook(book): Promise { | |
return new Promise(resolve => { | |
this.books.push(book); | |
resolve(this.books); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment