From 6b77ae9f3c9f81f166a867869cb552006194ea15 Mon Sep 17 00:00:00 2001 From: Tben Date: Tue, 8 Aug 2023 16:20:28 +0100 Subject: [PATCH] Updates --- package.json | 2 +- utils/get.js | 2 +- utils/post.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7eb8d10..f4ec942 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasquirel", - "version": "1.4.0", + "version": "1.4.1", "description": "Cloud-based SQL data management tool", "main": "index.js", "scripts": { diff --git a/utils/get.js b/utils/get.js index 0f7cc75..9492e78 100644 --- a/utils/get.js +++ b/utils/get.js @@ -45,7 +45,7 @@ async function get({ key, db, query, queryValues, tableName }) { .replace(/ /g, "+")}`; if (queryValues) { - path += `&queryValues=${JSON.stringify(queryValues)}${tableName ? `&tableName=${tableName}` : ""}}`; + path += `&queryValues=${JSON.stringify(queryValues)}${tableName ? `&tableName=${tableName}` : ""}`; } https diff --git a/utils/post.js b/utils/post.js index 8ff2081..2dec33e 100644 --- a/utils/post.js +++ b/utils/post.js @@ -106,13 +106,13 @@ async function post({ key, query, queryValues, database, tableName }) { try { resolve(JSON.parse(str)); } catch (error) { - console.log(error.message); + console.log(error); console.log("Fetched Payload =>", str); resolve({ success: false, payload: null, - error: error.message, + error: error, }); } }); @@ -130,7 +130,7 @@ async function post({ key, query, queryValues, database, tableName }) { httpsRequest.write(reqPayload); httpsRequest.on("error", (error) => { - console.log("HTTPS request ERROR =>", error.message); + console.log("HTTPS request ERROR =>", error); }); httpsRequest.end();