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",
"version": "1.4.0",
"version": "1.4.1",
"description": "Cloud-based SQL data management tool",
"main": "index.js",
"scripts": {

View File

@ -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

View File

@ -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();