shuttlepro-shared 1.2.88 → 1.2.89

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.
@@ -201,25 +201,15 @@ const updateRoleById = async (id, updateData) => {
201
201
  };
202
202
 
203
203
  const updateRoleByFilter = async (filter, updateData) => {
204
- console.log(filter, "filter");
205
- console.log(updateData, "updateData");
206
204
  const updatedRole = await Role.findOneAndUpdate(filter, updateData, {
207
205
  new: true,
208
206
  })
209
207
  .populate("permissionId")
210
208
  .lean()
211
209
  .exec();
212
-
213
- // if (updatedRole) {
214
- // if (updatedRole.workspaceId) {
215
- // await updateCachedRoles(updatedRole.workspaceId);
216
- // }
217
- // // Update default roles cache if needed
218
- // if (!updatedRole.workspaceId) {
219
- // await updateCachedDefaultRoles();
220
- // }
221
- // }
222
-
210
+ if (updatedRole?.workspaceId) {
211
+ await updateCachedRoles(updatedRole?.workspaceId?.toString());
212
+ }
223
213
  return updatedRole;
224
214
  };
225
215
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.2.88",
3
+ "version": "1.2.89",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {