diff --git a/package.json b/package.json index b03174886c..b0be98f981 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "client:build": "cd website/client && npm run build", "client:unit": "cd website/client && npm run test:unit", "start": "gulp nodemon", - "postinstall": "gulp build", + "postinstall": "gulp build && cd website/client && npm install", "apidoc": "gulp apidoc" }, "devDependencies": { diff --git a/test/api/v3/integration/user/POST-user_push_device.test.js b/test/api/v3/integration/user/POST-user_push_device.test.js index 9c39616cc8..06b5b9d229 100644 --- a/test/api/v3/integration/user/POST-user_push_device.test.js +++ b/test/api/v3/integration/user/POST-user_push_device.test.js @@ -61,15 +61,4 @@ describe('POST /user/push-devices', () => { expect(user.pushDevices[0].type).to.equal(type); expect(user.pushDevices[0].regId).to.equal(regId); }); - - it('removes a push device to the user', async () => { - await user.post('/user/push-devices', { type, regId }); - - const response = await user.del(`/user/push-devices/${regId}`); - await user.sync(); - - expect(response.message).to.equal(t('pushDeviceRemoved')); - expect(response.data[0]).to.not.exist; - expect(user.pushDevices[0]).to.not.exist; - }); }); diff --git a/website/client/package.json b/website/client/package.json index 86e1537f45..580c3b81ef 100644 --- a/website/client/package.json +++ b/website/client/package.json @@ -6,7 +6,7 @@ "serve": "vue-cli-service serve", "build": "vue-cli-service build", "test:unit": "vue-cli-service test:unit --opts ../../test/mocha.opts", - "lint": "vue-cli-service lint --quiet" + "lint": "vue-cli-service lint" }, "dependencies": { "amplitude-js": "^5.3.1", diff --git a/website/server/controllers/api-v3/pushNotifications.js b/website/server/controllers/api-v3/pushNotifications.js index 3ee0d9c592..83768ca48a 100644 --- a/website/server/controllers/api-v3/pushNotifications.js +++ b/website/server/controllers/api-v3/pushNotifications.js @@ -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