diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-07 10:31:56 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-07 10:31:56 +1300 |
commit | e5b44532710862eb404563c4e83d104be4b2680b (patch) | |
tree | af362322557a01e0541664d1e0617cb00850a136 /web/app/view/CommandDialogController.js | |
parent | 5b57c0fdb81bae87ca487e1d0087f8927b3fd07f (diff) | |
download | trackermap-server-e5b44532710862eb404563c4e83d104be4b2680b.tar.gz trackermap-server-e5b44532710862eb404563c4e83d104be4b2680b.tar.bz2 trackermap-server-e5b44532710862eb404563c4e83d104be4b2680b.zip |
Implement command REST resource
Diffstat (limited to 'web/app/view/CommandDialogController.js')
-rw-r--r-- | web/app/view/CommandDialogController.js | 6 |
1 files changed, 4 insertions, 2 deletions
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); } } }); |