This commit is contained in:
Tben 2023-08-08 16:20:28 +01:00
parent 704f7db83f
commit 6b77ae9f3c
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "datasquirel", "name": "datasquirel",
"version": "1.4.0", "version": "1.4.1",
"description": "Cloud-based SQL data management tool", "description": "Cloud-based SQL data management tool",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -45,7 +45,7 @@ async function get({ key, db, query, queryValues, tableName }) {
.replace(/ /g, "+")}`; .replace(/ /g, "+")}`;
if (queryValues) { if (queryValues) {
path += `&queryValues=${JSON.stringify(queryValues)}${tableName ? `&tableName=${tableName}` : ""}}`; path += `&queryValues=${JSON.stringify(queryValues)}${tableName ? `&tableName=${tableName}` : ""}`;
} }
https https

View File

@ -106,13 +106,13 @@ async function post({ key, query, queryValues, database, tableName }) {
try { try {
resolve(JSON.parse(str)); resolve(JSON.parse(str));
} catch (error) { } catch (error) {
console.log(error.message); console.log(error);
console.log("Fetched Payload =>", str); console.log("Fetched Payload =>", str);
resolve({ resolve({
success: false, success: false,
payload: null, payload: null,
error: error.message, error: error,
}); });
} }
}); });
@ -130,7 +130,7 @@ async function post({ key, query, queryValues, database, tableName }) {
httpsRequest.write(reqPayload); httpsRequest.write(reqPayload);
httpsRequest.on("error", (error) => { httpsRequest.on("error", (error) => {
console.log("HTTPS request ERROR =>", error.message); console.log("HTTPS request ERROR =>", error);
}); });
httpsRequest.end(); httpsRequest.end();