Bugfix
This commit is contained in:
@@ -2,7 +2,6 @@ import get from "../../actions/get";
|
||||
import post from "../../actions/post";
|
||||
import sqlGenerator from "../../functions/dsql/sql/sql-generator";
|
||||
import { DsqlCrudParam, PostReturn } from "../../types";
|
||||
import connDbHandler from "../db/conn-db-handler";
|
||||
|
||||
export default async function dsqlCrud<
|
||||
T extends { [key: string]: any } = { [key: string]: any }
|
||||
@@ -31,11 +30,12 @@ export default async function dsqlCrud<
|
||||
genObject: query,
|
||||
});
|
||||
|
||||
const GET_RES = await connDbHandler(
|
||||
global.DSQL_DB_CONN,
|
||||
queryObject?.string || "",
|
||||
queryObject?.values || []
|
||||
);
|
||||
const GET_RES = await get({
|
||||
query: queryObject?.string || "",
|
||||
queryValues: queryObject?.values || [],
|
||||
debug,
|
||||
forceLocal: true,
|
||||
});
|
||||
|
||||
return { ...GET_RES, queryObject };
|
||||
|
||||
@@ -46,6 +46,7 @@ export default async function dsqlCrud<
|
||||
table,
|
||||
data: finalData,
|
||||
},
|
||||
forceLocal: true,
|
||||
});
|
||||
|
||||
case "update":
|
||||
@@ -59,6 +60,7 @@ export default async function dsqlCrud<
|
||||
identifierValue: String(finalId),
|
||||
data: finalData,
|
||||
},
|
||||
forceLocal: true,
|
||||
});
|
||||
|
||||
case "delete":
|
||||
@@ -69,6 +71,7 @@ export default async function dsqlCrud<
|
||||
identifierColumnName: "id",
|
||||
identifierValue: String(finalId),
|
||||
},
|
||||
forceLocal: true,
|
||||
});
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user