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