Updates
This commit is contained in:
+3
-3
@@ -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);
|
||||
|
||||
@@ -20,6 +20,6 @@ export default function apiCreateUser({ encryptionKey, payload, database, userId
|
||||
} | {
|
||||
success: boolean;
|
||||
msg: string;
|
||||
sqlResult: any;
|
||||
sqlResult: import("../../../types").PostInsertReturn | null;
|
||||
payload: null;
|
||||
}>;
|
||||
|
||||
Reference in New Issue
Block a user