From 7b51b39383e883aded5fb931e1c82c45e1c6b556 Mon Sep 17 00:00:00 2001 From: Ruhaim Izmeth Date: Mon, 5 Mar 2018 22:16:43 +0530 Subject: [PATCH] fix error when returning --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e553543688..8b6dfdd80e 100644 --- a/index.js +++ b/index.js @@ -78,7 +78,7 @@ app = express() .query( `INSERT INTO public.books( "bookName", "bookAuthor", "bookYear", "bookPrice", "bookID") - VALUES ($1, $2, $3, $4, $5);`, + VALUES ($1, $2, $3, $4, $5) RETURNING bookID;`, ['some name', 'no name', 2016, 65.09, uuidv4()] ) .then(res => {