Updates
This commit is contained in:
+6
-9
@@ -26,11 +26,6 @@ function apiGet(_a) {
|
||||
query.match(/^alter|^delete|information_schema|databases|^create/i)) {
|
||||
return { success: false, msg: "Wrong Input." };
|
||||
}
|
||||
/**
|
||||
* Create new user folder and file
|
||||
*
|
||||
* @description Create new user folder and file
|
||||
*/
|
||||
let results;
|
||||
try {
|
||||
let { result, error } = yield (0, runQuery_1.default)({
|
||||
@@ -42,7 +37,6 @@ function apiGet(_a) {
|
||||
tableName,
|
||||
local: useLocal,
|
||||
});
|
||||
/** @type {import("../../../types").DSQL_TableSchemaType | undefined} */
|
||||
let tableSchema;
|
||||
if (dbSchema) {
|
||||
const targetTable = dbSchema.tables.find((table) => table.tableName === tableName);
|
||||
@@ -63,7 +57,6 @@ function apiGet(_a) {
|
||||
if (result.error)
|
||||
throw new Error(result.error);
|
||||
results = result;
|
||||
/** @type {import("../../../types").GetReturn} */
|
||||
const resObject = {
|
||||
success: true,
|
||||
payload: results,
|
||||
@@ -71,12 +64,16 @@ function apiGet(_a) {
|
||||
};
|
||||
return resObject;
|
||||
}
|
||||
catch ( /** @type {any} */error) {
|
||||
catch (error) {
|
||||
(0, serverError_1.default)({
|
||||
component: "/api/query/get/lines-85-94",
|
||||
message: error.message,
|
||||
});
|
||||
return { success: false, payload: null, error: error.message };
|
||||
return {
|
||||
success: false,
|
||||
payload: null,
|
||||
error: error.message,
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user