n39librarian/middleware/queries/editBook.ts

10 lines
306 B
TypeScript

import { Book } from "../types/Book";
export const editBook = ({
uuid,
isbn,
title,
published,
shelf,
}: Pick<Book, "uuid" | "isbn" | "title" | "published" | "shelf">) =>
`UPDATE bookData SET shelf='${shelf}', isbn='${isbn}', title='${title}', published='${published}' WHERE uuid='${uuid}';`;