shuttlepro-shared 1.2.40 → 1.2.41

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.
@@ -126,7 +126,7 @@ const deleteUserRole = async (id) => {
126
126
  const findUserWorkspaces = async (userId) => {
127
127
  const cacheKey = `${CACHE_KEY_USER_WORKSPACE_PREFIX}${userId}`;
128
128
  let userRoleWithWorkspaces = await getRedisData(cacheKey);
129
- if (!userRoleWithWorkspaces.length) {
129
+ if (!userRoleWithWorkspaces) {
130
130
  userRoleWithWorkspaces = await UserRole.find({
131
131
  userId: userId,
132
132
  })
@@ -152,7 +152,7 @@ const findUserWorkspaces = async (userId) => {
152
152
  permissions: ur?.roleId?.modulePermissions?.modules || [],
153
153
  };
154
154
  });
155
- if (userRoleWithWorkspaces.length) {
155
+ if (userRoleWithWorkspaces) {
156
156
  await setRedisData(cacheKey, userRoleWithWorkspaces, null, 0);
157
157
  }
158
158
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.2.40",
3
+ "version": "1.2.41",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {