Updates
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user