@malevich-studio/strapi-sdk-typescript 1.2.19 → 1.2.20

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/dist/cli.mjs CHANGED
@@ -21442,8 +21442,8 @@ class Strapi {
21442
21442
  }
21443
21443
  async can(uid, controller, action) {
21444
21444
  if (!this.permissionsList) {
21445
- const { role } = await this.me();
21446
- const response = await this.fetchData(`users-permissions/role/${role?.documentId}`);
21445
+ const { role } = await this.me({ populate: { role: { fields: ["id"] } } });
21446
+ const response = await this.fetchData(`users-permissions/roles/${role?.id}`);
21447
21447
  this.permissionsList = response.role.permissions;
21448
21448
  }
21449
21449
  if (!this.permissionsList[uid]) {