fix mongoose issue

This commit is contained in:
Matteo Pagliazzi
2019-10-13 18:31:43 +02:00
parent a0e5a56bf2
commit a1e3127d36
4 changed files with 3 additions and 14 deletions

View File

@@ -91,7 +91,7 @@ api.removePushDevice = {
}
// Concurrency safe update
const pullQuery = { $pull: { pushDevices: { $elemMatch: { regId } } } };
const pullQuery = { $pull: { pushDevices: { regId } } };
await user.update(pullQuery).exec();
// Update the response