@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @authhero/react-admin
2
2
 
3
+ ## 0.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 928d358: Add userinfo hook
8
+
3
9
  ## 0.17.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authhero/react-admin",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -1254,6 +1254,22 @@ export default (
1254
1254
  return { data: res.json };
1255
1255
  },
1256
1256
 
1257
- deleteMany: () => Promise.reject("not supporting 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
  };