feat: allow account and competitor deletion
This commit is contained in:
@@ -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 } };
|
||||
|
||||
Reference in New Issue
Block a user