aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/RegisterController.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/RegisterController.js')
-rw-r--r--web/app/view/RegisterController.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/app/view/RegisterController.js b/web/app/view/RegisterController.js
index 5cf41fc65..9dcfe2107 100644
--- a/web/app/view/RegisterController.js
+++ b/web/app/view/RegisterController.js
@@ -23,7 +23,8 @@ Ext.define('Traccar.view.RegisterController', {
if (form.isValid()) {
Ext.Ajax.request({
scope: this,
- url: '/api/register',
+ method: 'POST',
+ url: '/api/rest/users',
jsonData: form.getValues(),
callback: this.onCreateReturn
});
@@ -31,9 +32,11 @@ Ext.define('Traccar.view.RegisterController', {
},
onCreateReturn: function (options, success, response) {
- if (Traccar.ErrorManager.check(success, response)) {
+ if (success) {
this.closeView();
Ext.toast(Strings.loginCreated);
+ } else {
+ Traccar.app.showError(response);
}
}