This commit is contained in:
Benjamin Toby
2025-08-13 11:42:07 +01:00
parent 56198e8ac5
commit e8269a8b5e
7 changed files with 40 additions and 32 deletions
@@ -5,7 +5,8 @@ import checkArrayDepth from "../check-array-depth";
import parseDbResults from "../../functions/backend/parseDbResults";
export default async function <
T extends { [key: string]: any } = { [key: string]: any }
T extends { [key: string]: any } = { [key: string]: any },
K extends string = string
>({
table,
query,
@@ -15,7 +16,7 @@ export default async function <
tableSchema,
dbConfig,
}: Omit<
DsqlCrudParam<T>,
DsqlCrudParam<T, K>,
"action" | "data" | "sanitize"
>): Promise<APIResponseObject> {
let queryObject: ReturnType<Awaited<typeof sqlGenerator>> | undefined;
+1 -1
View File
@@ -38,7 +38,7 @@ export default async function dsqlCrud<
switch (action) {
case "get":
return await dsqlCrudGet(params);
return await dsqlCrudGet<T, K>(params);
// case "batch-get":
// return await dsqlCrudBatchGet(params);