From e5b44532710862eb404563c4e83d104be4b2680b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 7 Dec 2015 10:31:56 +1300 Subject: Implement command REST resource --- web/app/view/CommandDialogController.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'web/app/view/CommandDialogController.js') diff --git a/web/app/view/CommandDialogController.js b/web/app/view/CommandDialogController.js index 94df2ec42..bf2fe4fde 100644 --- a/web/app/view/CommandDialogController.js +++ b/web/app/view/CommandDialogController.js @@ -42,16 +42,18 @@ Ext.define('Traccar.view.CommandDialogController', { Ext.Ajax.request({ scope: this, - url: '/api/command/send', + url: '/api/rest/commands', jsonData: record.getData(), callback: this.onSendResult }); }, onSendResult: function (options, success, response) { - if (Traccar.ErrorManager.check(success, response)) { + if (success) { Ext.toast(Strings.commandSent); this.closeView(); + } else { + Traccar.app.showError(response); } } }); -- cgit v1.2.3