aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-12-07 10:31:56 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-12-07 10:31:56 +1300
commite5b44532710862eb404563c4e83d104be4b2680b (patch)
treeaf362322557a01e0541664d1e0617cb00850a136 /web
parent5b57c0fdb81bae87ca487e1d0087f8927b3fd07f (diff)
downloadtrackermap-server-e5b44532710862eb404563c4e83d104be4b2680b.tar.gz
trackermap-server-e5b44532710862eb404563c4e83d104be4b2680b.tar.bz2
trackermap-server-e5b44532710862eb404563c4e83d104be4b2680b.zip
Implement command REST resource
Diffstat (limited to 'web')
-rw-r--r--web/app/view/CommandDialogController.js6
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);
}
}
});