shuttlepro-shared 1.4.89 → 1.4.90
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/models/Profile.js +9 -10
- package/package.json +1 -1
package/models/Profile.js
CHANGED
|
@@ -69,15 +69,14 @@ const fetchProfileByEmailAndWorkspaceId = async (
|
|
|
69
69
|
userName = ""
|
|
70
70
|
) => {
|
|
71
71
|
try {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
);
|
|
72
|
+
// Direct database fetch without Redis (to avoid Redis issues)
|
|
73
|
+
const profile = await Profile.findOne({
|
|
74
|
+
userName: userName,
|
|
75
|
+
workspaceId: workspaceId
|
|
76
|
+
}).lean().exec();
|
|
78
77
|
return profile || null;
|
|
79
78
|
} catch (err) {
|
|
80
|
-
console.log(err, "err");
|
|
79
|
+
console.log(err, "err in fetchProfileByEmailAndWorkspaceId");
|
|
81
80
|
return null;
|
|
82
81
|
}
|
|
83
82
|
};
|
|
@@ -85,7 +84,7 @@ const fetchProfileByEmailAndWorkspaceId = async (
|
|
|
85
84
|
const createProfile = async (obj) => {
|
|
86
85
|
try {
|
|
87
86
|
let profile = await Profile.create(obj);
|
|
88
|
-
await addOrUpdateProfilesInRedis(profile);
|
|
87
|
+
// await addOrUpdateProfilesInRedis(profile);
|
|
89
88
|
return profile;
|
|
90
89
|
} catch (err) {
|
|
91
90
|
console.log(err, "err");
|
|
@@ -102,7 +101,7 @@ const createUpdateProfileModified = async (filter, obj) => {
|
|
|
102
101
|
upsert: true,
|
|
103
102
|
}
|
|
104
103
|
);
|
|
105
|
-
await addOrUpdateProfilesInRedis(profile);
|
|
104
|
+
// await addOrUpdateProfilesInRedis(profile);
|
|
106
105
|
return profile;
|
|
107
106
|
} catch (err) {
|
|
108
107
|
console.log(err, "err");
|
|
@@ -114,7 +113,7 @@ const updateProfile = async (query, payload) => {
|
|
|
114
113
|
const profile = await Profile.findOneAndUpdate(query, payload, {
|
|
115
114
|
new: true,
|
|
116
115
|
});
|
|
117
|
-
await addOrUpdateProfilesInRedis(profile);
|
|
116
|
+
// await addOrUpdateProfilesInRedis(profile);
|
|
118
117
|
return profile;
|
|
119
118
|
} catch (err) {
|
|
120
119
|
return null;
|