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.
Files changed (2) hide show
  1. package/models/Profile.js +9 -10
  2. 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
- let profiles = await fetchProfiles(workspaceId);
73
- let profile = profiles.find(
74
- (p) =>
75
- p?.userName === userName &&
76
- p?.workspaceId?.toString() === workspaceId?.toString()
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.4.89",
3
+ "version": "1.4.90",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {