feat: allow account and competitor deletion

This commit is contained in:
2026-09-17 16:09:17 +08:00
parent 1bf905599c
commit 9ee7989f88
13 changed files with 705 additions and 6 deletions
+4 -1
View File
@@ -162,7 +162,10 @@ export const dataProvider = {
},
async deleteOne({ resource, id }) {
const path = resourcePaths[resource];
if (!path || resource !== "browser-images")
if (
!path ||
!["browser-images", "accounts", "creator-competitors"].includes(resource)
)
return unsupported(resource, "deleteOne");
await request(`${path}/${encodeURIComponent(id)}`, { method: "DELETE" });
return { data: { id } };