This commit is contained in:
Benjamin Toby
2025-06-04 08:43:16 +01:00
parent 1364074c2c
commit 761348de08
37 changed files with 577 additions and 140 deletions
+3 -3
View File
@@ -22,7 +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;
var _b, _c;
const queryAndValues = (0, grab_query_and_values_1.default)({
query,
values: queryValues,
@@ -49,7 +49,7 @@ function apiGet(_a) {
}
let tableSchema;
if (dbSchema) {
const targetTable = dbSchema.tables.find((table) => table.tableName === tableName);
const targetTable = (_b = dbSchema.tables) === null || _b === void 0 ? void 0 : _b.find((table) => table.tableName === tableName);
if (targetTable) {
const clonedTargetTable = lodash_1.default.cloneDeep(targetTable);
delete clonedTargetTable.childTable;
@@ -79,7 +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);
(_c = global.ERROR_CALLBACK) === null || _c === void 0 ? void 0 : _c.call(global, `API Get Error`, error);
if (debug && global.DSQL_USE_LOCAL) {
console.log("apiGet:error", error.message);
console.log("queryAndValues", queryAndValues);