@authhero/react-admin 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/auth0DataProvider.ts +17 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/auth0DataProvider.ts
CHANGED
|
@@ -1254,6 +1254,22 @@ export default (
|
|
|
1254
1254
|
return { data: res.json };
|
|
1255
1255
|
},
|
|
1256
1256
|
|
|
1257
|
-
deleteMany: () =>
|
|
1257
|
+
deleteMany: async (resource, params) => {
|
|
1258
|
+
const headers = new Headers({ "content-type": "text/plain" });
|
|
1259
|
+
if (tenantId) headers.set("tenant-id", tenantId);
|
|
1260
|
+
|
|
1261
|
+
const deletedIds: typeof params.ids = [];
|
|
1262
|
+
|
|
1263
|
+
for (const id of params.ids) {
|
|
1264
|
+
const resourceUrl = `${resource}/${encodeURIComponent(String(id))}`;
|
|
1265
|
+
await httpClient(`${apiUrl}/api/v2/${resourceUrl}`, {
|
|
1266
|
+
method: "DELETE",
|
|
1267
|
+
headers,
|
|
1268
|
+
});
|
|
1269
|
+
deletedIds.push(id);
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
return { data: deletedIds };
|
|
1273
|
+
},
|
|
1258
1274
|
};
|
|
1259
1275
|
};
|