aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
Diffstat (limited to 'web/app')
-rw-r--r--web/app/model/User.js4
-rw-r--r--web/app/store/AllDevices.js8
-rw-r--r--web/app/store/Devices.js14
-rw-r--r--web/app/store/Users.js14
4 files changed, 8 insertions, 32 deletions
diff --git a/web/app/model/User.js b/web/app/model/User.js
index d0a6e5e14..d4c67f8f1 100644
--- a/web/app/model/User.js
+++ b/web/app/model/User.js
@@ -57,8 +57,8 @@ Ext.define('Traccar.model.User', {
}],
proxy: {
- type: 'ajax',
- url: '/api/user/update',
+ type: 'rest',
+ url: '/api/rest/users',
writer: {
type: 'json',
writeAllFields: true
diff --git a/web/app/store/AllDevices.js b/web/app/store/AllDevices.js
index a591b6561..7e268f747 100644
--- a/web/app/store/AllDevices.js
+++ b/web/app/store/AllDevices.js
@@ -19,14 +19,10 @@ Ext.define('Traccar.store.AllDevices', {
model: 'Traccar.model.Device',
proxy: {
- type: 'ajax',
- url: '/api/device/get',
+ type: 'rest',
+ url: '/api/rest/devices',
extraParams: {
all: true
- },
- reader: {
- type: 'json',
- rootProperty: 'data'
}
}
});
diff --git a/web/app/store/Devices.js b/web/app/store/Devices.js
index 24777de5a..c8c95bda0 100644
--- a/web/app/store/Devices.js
+++ b/web/app/store/Devices.js
@@ -19,19 +19,9 @@ Ext.define('Traccar.store.Devices', {
model: 'Traccar.model.Device',
proxy: {
- type: 'ajax',
- api: {
- create: '/api/device/add',
- read: '/api/device/get',
- update: '/api/device/update',
- destroy: '/api/device/remove'
- },
- reader: {
- type: 'json',
- rootProperty: 'data'
- },
+ type: 'rest',
+ url: '/api/rest/devices',
writer: {
- type: 'json',
writeAllFields: true
}
}
diff --git a/web/app/store/Users.js b/web/app/store/Users.js
index 004dc727e..5427c2d70 100644
--- a/web/app/store/Users.js
+++ b/web/app/store/Users.js
@@ -19,19 +19,9 @@ Ext.define('Traccar.store.Users', {
model: 'Traccar.model.User',
proxy: {
- type: 'ajax',
- api: {
- create: '/api/user/add',
- read: '/api/user/get',
- update: '/api/user/update',
- destroy: '/api/user/remove'
- },
- reader: {
- type: 'json',
- rootProperty: 'data'
- },
+ type: 'rest',
+ url: '/api/rest/users',
writer: {
- type: 'json',
writeAllFields: true
}
}