Commit 0dbae838 authored by Aurélien Vermylen's avatar Aurélien Vermylen

Fix user sync.

parent b9464f1a
...@@ -23,8 +23,10 @@ ...@@ -23,8 +23,10 @@
/^\/vehicle(\/C_\w*(\/mil|)|)\/$/], /^\/vehicle(\/C_\w*(\/mil|)|)\/$/],
AUTOMATIC_VALID_ENDPOINTID_REGEXES = [/^\/trip\/T_\w*\/$/, AUTOMATIC_VALID_ENDPOINTID_REGEXES = [/^\/trip\/T_\w*\/$/,
/^\/user\/me\/device\/\w*\/$/, /^\/user\/me\/device\/\w*\/$/,
/^\/user\/U_\w*\/$/,
/^\/user\/U_\w*\/device\/\w*\/$/, /^\/user\/U_\w*\/device\/\w*\/$/,
/^\/vehicle\/C_\w*\/$/], /^\/vehicle\/C_\w*\/$/,
/^\/user\/me\/$/],
automatic_template = UriTemplate.parse(AUTOMATIC_BASE_URI + automatic_template = UriTemplate.parse(AUTOMATIC_BASE_URI +
'{/endpoint*}'); '{/endpoint*}');
...@@ -451,6 +453,9 @@ ...@@ -451,6 +453,9 @@
if (automatic_endpoint === '/device/') { if (automatic_endpoint === '/device/') {
automatic_endpoint = '/user/me/device/'; automatic_endpoint = '/user/me/device/';
} }
if (automatic_endpoint === '/user/') {
automatic_endpoint = '/user/me/';
}
return _queryAutomaticAPI(automatic_endpoint, automatic_filters, this) return _queryAutomaticAPI(automatic_endpoint, automatic_filters, this)
.push(function (results) { .push(function (results) {
if (!(results instanceof Array)) { if (!(results instanceof Array)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment