Bugfix
This commit is contained in:
+1
-1
@@ -4,6 +4,6 @@ export default function dsqlCrud<T extends {
|
||||
[key: string]: any;
|
||||
} = {
|
||||
[key: string]: any;
|
||||
}>({ action, data, table, targetId, query, sanitize, }: DsqlCrudParam<T>): Promise<(PostReturn & {
|
||||
}>({ action, data, table, targetId, query, sanitize, debug, }: DsqlCrudParam<T>): Promise<(PostReturn & {
|
||||
queryObject?: ReturnType<Awaited<typeof sqlGenerator>>;
|
||||
}) | null>;
|
||||
|
||||
+2
-1
@@ -17,7 +17,7 @@ const get_1 = __importDefault(require("../../actions/get"));
|
||||
const post_1 = __importDefault(require("../../actions/post"));
|
||||
const sql_generator_1 = __importDefault(require("../../functions/dsql/sql/sql-generator"));
|
||||
function dsqlCrud(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ action, data, table, targetId, query, sanitize, }) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ action, data, table, targetId, query, sanitize, debug, }) {
|
||||
const finalData = sanitize ? sanitize(data) : data;
|
||||
const finalId = targetId;
|
||||
let queryObject;
|
||||
@@ -30,6 +30,7 @@ function dsqlCrud(_a) {
|
||||
const GET_RES = yield (0, get_1.default)({
|
||||
query: (queryObject === null || queryObject === void 0 ? void 0 : queryObject.string) || "",
|
||||
queryValues: (queryObject === null || queryObject === void 0 ? void 0 : queryObject.values) || [],
|
||||
debug,
|
||||
});
|
||||
return Object.assign(Object.assign({}, GET_RES), { queryObject });
|
||||
case "insert":
|
||||
|
||||
Reference in New Issue
Block a user