shuttlepro-shared 1.3.65 → 1.3.67
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/config/redis.js +2 -0
- package/models/Conversation.js +1 -0
- package/models/Integration.js +1 -0
- package/models/User.js +0 -10
- package/package.json +1 -1
package/config/redis.js
CHANGED
|
@@ -70,6 +70,7 @@ const setRedisData = async (
|
|
|
70
70
|
expiryInSeconds = 3600
|
|
71
71
|
) => {
|
|
72
72
|
try {
|
|
73
|
+
await connectRedis();
|
|
73
74
|
const stringifiedValue = JSON.stringify(value);
|
|
74
75
|
let result;
|
|
75
76
|
|
|
@@ -93,6 +94,7 @@ const setRedisData = async (
|
|
|
93
94
|
// ✅ Get Data from Redis (Supports String & Hash)
|
|
94
95
|
const getRedisData = async (key, field = null) => {
|
|
95
96
|
try {
|
|
97
|
+
await connectRedis();
|
|
96
98
|
const result = field
|
|
97
99
|
? await client.hGet(key, field)
|
|
98
100
|
: await client.get(key);
|
package/models/Conversation.js
CHANGED
package/models/Integration.js
CHANGED
package/models/User.js
CHANGED
|
@@ -31,16 +31,6 @@ const UserSchema = new Schema(
|
|
|
31
31
|
type: Schema.Types.ObjectId,
|
|
32
32
|
ref: "User",
|
|
33
33
|
},
|
|
34
|
-
deviceTokens: {
|
|
35
|
-
type: [
|
|
36
|
-
{
|
|
37
|
-
token: { type: String, required: true },
|
|
38
|
-
platform: { type: String, enum: ["ios", "android", "web"] },
|
|
39
|
-
lastUsedAt: { type: String },
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
default: [],
|
|
43
|
-
},
|
|
44
34
|
},
|
|
45
35
|
{ timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
|
|
46
36
|
);
|