From 49688fd4988620a1bb4a5e02ffbe55ec238f5857 Mon Sep 17 00:00:00 2001 From: Afsha10 Date: Fri, 20 Oct 2023 05:31:31 +0100 Subject: [PATCH] Put ; in query and at the end of config file --- client/plan.md | 3 +++ client/src/config.js | 5 +++-- server/server.js | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/plan.md b/client/plan.md index 1f756ef359..c087a16f17 100644 --- a/client/plan.md +++ b/client/plan.md @@ -122,3 +122,6 @@ We will always need to hand down the following: const unValidatedUrl = new URL(event.target.form.url.value); // const isValidated = validateUrl(unValidatedUrl); + + + diff --git a/client/src/config.js b/client/src/config.js index 187ca71f0b..aa447297ab 100644 --- a/client/src/config.js +++ b/client/src/config.js @@ -1,3 +1,4 @@ -export const baseUrl = "https://afsha-full-stack-video-storage-app.onrender.com" // prod +export const baseUrl = + "https://afsha-full-stack-video-storage-app.onrender.com"; // prod -// export const baseUrl = "http://localhost:5000" //dev +// export const baseUrl = "http://localhost:5000"; //dev diff --git a/server/server.js b/server/server.js index 8d97e76248..ce1acdcbce 100644 --- a/server/server.js +++ b/server/server.js @@ -86,7 +86,7 @@ app.post("/videos", (req, res) => { }); } else { const query = `INSERT INTO videos (title, url, rating, createdAt) - VALUES ($1, $2, 0, now())`; + VALUES ($1, $2, 0, now());`; db.query(query, [title, url]) .then(() => {