Updates
This commit is contained in:
@@ -22,6 +22,7 @@ const grab_query_and_values_1 = __importDefault(require("../../../utils/grab-que
|
||||
*/
|
||||
function apiGet(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ query, dbFullName, queryValues, tableName, dbSchema, debug, dbContext, forceLocal, }) {
|
||||
var _b;
|
||||
const queryAndValues = (0, grab_query_and_values_1.default)({
|
||||
query,
|
||||
values: queryValues,
|
||||
@@ -78,6 +79,7 @@ function apiGet(_a) {
|
||||
component: "/api/query/get/lines-85-94",
|
||||
message: error.message,
|
||||
});
|
||||
(_b = global.ERROR_CALLBACK) === null || _b === void 0 ? void 0 : _b.call(global, `API Get Error`, error);
|
||||
if (debug && global.DSQL_USE_LOCAL) {
|
||||
console.log("apiGet:error", error.message);
|
||||
}
|
||||
|
||||
+2
-1
@@ -21,7 +21,7 @@ const runQuery_1 = __importDefault(require("../../backend/db/runQuery"));
|
||||
*/
|
||||
function apiPost(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ query, dbFullName, queryValues, tableName, dbSchema, dbContext, forceLocal, }) {
|
||||
var _b;
|
||||
var _b, _c;
|
||||
if (typeof query === "string" && (query === null || query === void 0 ? void 0 : query.match(/^create |^alter |^drop /i))) {
|
||||
return { success: false, msg: "Wrong Input" };
|
||||
}
|
||||
@@ -75,6 +75,7 @@ function apiPost(_a) {
|
||||
component: "/api/query/post/lines-132-142",
|
||||
message: error.message,
|
||||
});
|
||||
(_c = global.ERROR_CALLBACK) === null || _c === void 0 ? void 0 : _c.call(global, `API Post Error`, error);
|
||||
return {
|
||||
success: false,
|
||||
payload: results,
|
||||
|
||||
Reference in New Issue
Block a user