shuttlepro-shared 1.4.88 → 1.4.89

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 CHANGED
@@ -49,14 +49,17 @@ const fetchProfiles = async (workspaceId) => {
49
49
 
50
50
  const fetchByProfileIdAndWorkspaceId = async (id, workspaceId) => {
51
51
  try {
52
- let profiles = await fetchProfiles(workspaceId);
53
- let profile = profiles.find(
54
- (p) =>
55
- (p?.profileId === id || p._id.toString() === id.toString()) &&
56
- p?.workspaceId.toString() === workspaceId.toString()
57
- );
52
+ // Direct database fetch without Redis (to avoid Redis issues in webhook routes)
53
+ const profile = await Profile.findOne({
54
+ $or: [
55
+ { profileId: id },
56
+ { _id: id }
57
+ ],
58
+ workspaceId: workspaceId
59
+ }).lean().exec();
58
60
  return profile || null;
59
61
  } catch (err) {
62
+ console.log(err, "err in fetchByProfileIdAndWorkspaceId");
60
63
  return null;
61
64
  }
62
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.4.88",
3
+ "version": "1.4.89",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {