diff --git a/app/server/api.js b/app/server/api.js index 49c999c..e4151c7 100644 --- a/app/server/api.js +++ b/app/server/api.js @@ -36,13 +36,15 @@ Api.addRoute('alarm/:id/phonePing', { authRequired: false }, { post: function() { - return ControllerState.update({ + ControllerState.update({ controller_id: this.urlParams.id }, { '$set': { 'lastPhoneContact': new Date(), } }); + + return stateOrDefault(this.urlParams.id); } });