DEV Community

Discussion on: Simple REST API with Deno

Collapse
 
lukethacoder profile image
Luke Secomb

Great article.

Might need to add those last few lines to the controller.ts file.

/* return the book if found and undefined if not */
const searchBookByIsbn = (isbn: string): ( IBook | undefined ) => books.filter(book => book.isbn === isbn )[0]

export { getBooks, getBook, addBook, updateBook, deleteBook }
Collapse
 
am77 profile image
Mohamed Amine Griche

Ah yes, Thank you.