aaspai-authx 0.0.4 → 0.0.5

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/index.js CHANGED
@@ -509,7 +509,7 @@ var AuthAdminService = class {
509
509
  return user;
510
510
  }
511
511
  async assignRealmRole(userId, roleName) {
512
- const role = await RolePermissionModel.findOne({ name: roleName });
512
+ const role = await RolePermissionModel.findOne({ role: roleName });
513
513
  if (!role) throw new Error(`Role not found: ${roleName}`);
514
514
  await OrgUser.findOneAndUpdate(
515
515
  { id: userId },