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
- ?.filter((userRole) => userRole?.workspaceId)
176
- ?.map((ur) => {
177
- return {
178
- ...ur?.workspaceId,
179
- id: ur?.workspaceId?._id?.toString(),
180
- _id: ur?.workspaceId?._id?.toString(),
181
- role: ur?.roleId?.name || "",
182
- permissions: ur?.roleId?.modulePermissions?.modules || [],
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
  }
@@ -1,4 +1,7 @@
1
1
  /* eslint-disable no-undef */
2
2
  module.exports = {
3
- url: process.env.DB_URL,
3
+ url:
4
+ process.env.NODE_ENV === "test"
5
+ ? process.env.TEST_DB_URL
6
+ : process.env.DB_URL,
4
7
  };
package/models/Card.js CHANGED
@@ -76,7 +76,7 @@ const cardSchema = new mongoose.Schema(
76
76
  default: Date.now,
77
77
  },
78
78
  ticketId: {
79
- type: Number,
79
+ type: String,
80
80
  },
81
81
  category: {
82
82
  type: String,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.2.60",
3
+ "version": "1.2.61",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -25,4 +25,4 @@
25
25
  "redis": "^4.6.14",
26
26
  "socket.io": "^4.8.1"
27
27
  }
28
- }
28
+ }