aboutsummaryrefslogtreecommitdiff
path: root/web/app/view
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view')
-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);
}
}
});