This commit is contained in:
2025-12-26 10:33:46 +01:00
parent 0e5b5fea6e
commit f95cf21ffd
15 changed files with 99 additions and 23 deletions
@@ -7,6 +7,7 @@ export default async function <
table,
body,
targetId,
query,
}: APIPathsCrudParams<T>): Promise<APIResponseObject> {
if (!targetId && !body?.searchQuery) {
throw new Error(
@@ -18,7 +19,7 @@ export default async function <
...body?.crudParams,
action: "delete",
table,
query: body?.searchQuery,
query: query?.searchQuery,
targetId,
});
@@ -7,6 +7,7 @@ export default async function <
table,
body,
targetId,
query,
}: APIPathsCrudParams<T>): Promise<APIResponseObject> {
if (!targetId && !body?.searchQuery) {
throw new Error(
@@ -19,7 +20,7 @@ export default async function <
action: "update",
table,
data: body?.data,
query: body?.searchQuery,
query: query?.searchQuery,
targetId,
});