Updates
This commit is contained in:
+7
-9
@@ -1,12 +1,11 @@
|
||||
// @ts-check
|
||||
|
||||
const http = require("node:http");
|
||||
const https = require("node:https");
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
const localGet = require("../engine/query/get");
|
||||
const serializeQuery = require("./functions/serialize-query");
|
||||
const grabHostNames = require("../package-shared/utils/grab-host-names");
|
||||
const apiGet = require("../package-shared/functions/api/query/get");
|
||||
|
||||
/**
|
||||
* Make a get request to Datasquirel API
|
||||
@@ -62,13 +61,12 @@ async function get({
|
||||
dbSchema = JSON.parse(fs.readFileSync(localDbSchemaPath, "utf8"));
|
||||
} catch (error) {}
|
||||
|
||||
return await localGet({
|
||||
dbSchema: dbSchema,
|
||||
options: {
|
||||
query: query,
|
||||
queryValues: queryValues,
|
||||
tableName: tableName,
|
||||
},
|
||||
return await apiGet({
|
||||
dbFullName: DSQL_DB_NAME,
|
||||
query,
|
||||
queryValues,
|
||||
tableName,
|
||||
dbSchema,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+7
-8
@@ -2,8 +2,8 @@
|
||||
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
const localPost = require("../engine/query/post");
|
||||
const grabHostNames = require("../package-shared/utils/grab-host-names");
|
||||
const apiPost = require("../package-shared/functions/api/query/post");
|
||||
|
||||
/**
|
||||
* # Make a post request to Datasquirel API
|
||||
@@ -58,13 +58,12 @@ async function post({
|
||||
dbSchema = JSON.parse(fs.readFileSync(localDbSchemaPath, "utf8"));
|
||||
} catch (error) {}
|
||||
|
||||
return await localPost({
|
||||
dbSchema: dbSchema,
|
||||
options: {
|
||||
query: query,
|
||||
queryValues: queryValues,
|
||||
tableName: tableName,
|
||||
},
|
||||
return await apiPost({
|
||||
dbFullName: DSQL_DB_NAME,
|
||||
query,
|
||||
dbSchema,
|
||||
queryValues,
|
||||
tableName,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user