shuttlepro-shared 1.1.75 → 1.1.76

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
@@ -89,7 +89,14 @@ const createProfile = async (obj) => {
89
89
  };
90
90
  const createUpdateProfileModified = async (filter, obj) => {
91
91
  try {
92
- let profile = await Profile.findOneAndUpdate(filter, obj, { new: true });
92
+ let profile = await Profile.findOneAndUpdate(
93
+ filter,
94
+ { ...obj, ...filter },
95
+ {
96
+ new: true,
97
+ upsert: true,
98
+ }
99
+ );
93
100
  await addOrUpdateProfilesInRedis(profile);
94
101
  return profile;
95
102
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.1.75",
3
+ "version": "1.1.76",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {