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

Fix user sync.

parent b9464f1a
......@@ -23,8 +23,10 @@
/^\/vehicle(\/C_\w*(\/mil|)|)\/$/],
AUTOMATIC_VALID_ENDPOINTID_REGEXES = [/^\/trip\/T_\w*\/$/,
/^\/user\/me\/device\/\w*\/$/,
/^\/user\/U_\w*\/$/,
/^\/user\/U_\w*\/device\/\w*\/$/,
/^\/vehicle\/C_\w*\/$/],
/^\/vehicle\/C_\w*\/$/,
/^\/user\/me\/$/],
automatic_template = UriTemplate.parse(AUTOMATIC_BASE_URI +
'{/endpoint*}');
......@@ -451,6 +453,9 @@
if (automatic_endpoint === '/device/') {
automatic_endpoint = '/user/me/device/';
}
if (automatic_endpoint === '/user/') {
automatic_endpoint = '/user/me/';
}
return _queryAutomaticAPI(automatic_endpoint, automatic_filters, this)
.push(function (results) {
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