shuttlepro-shared 1.2.60 → 1.2.61
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.
|
@@ -171,17 +171,15 @@ const findUserWorkspaces = async (userId) => {
|
|
|
171
171
|
})
|
|
172
172
|
.lean()
|
|
173
173
|
.exec();
|
|
174
|
-
userRoleWithWorkspaces = userRoleWithWorkspaces
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
};
|
|
184
|
-
});
|
|
174
|
+
userRoleWithWorkspaces = userRoleWithWorkspaces.map((ur) => {
|
|
175
|
+
return {
|
|
176
|
+
...ur?.workspaceId,
|
|
177
|
+
id: ur?.workspaceId?._id?.toString(),
|
|
178
|
+
_id: ur?.workspaceId?._id?.toString(),
|
|
179
|
+
role: ur?.roleId?.name || "",
|
|
180
|
+
permissions: ur?.roleId?.modulePermissions?.modules || [],
|
|
181
|
+
};
|
|
182
|
+
});
|
|
185
183
|
if (userRoleWithWorkspaces) {
|
|
186
184
|
await setRedisData(cacheKey, userRoleWithWorkspaces, null, 0);
|
|
187
185
|
}
|
package/config/database.js
CHANGED
package/models/Card.js
CHANGED