Przeglądaj źródła

Merge pull request #4963 from weseek/fix/84315-codeql-test

fix: 84315 codeql test
Yuki Takei 4 lat temu
rodzic
commit
f743d8ca8f

+ 1 - 1
packages/app/src/server/routes/apiv3/personal-setting.js

@@ -585,7 +585,7 @@ module.exports = (crowi) => {
 
     const options = { upsert: true, new: true, runValidators: true };
     try {
-      const response = await InAppNotificationSettings.findOneAndUpdate(query, { subscribeRules }, options);
+      const response = await InAppNotificationSettings.findOneAndUpdate(query, { $set: { subscribeRules } }, options);
       return res.apiv3(response);
     }
     catch (err) {