1
0
Fork 0

fixed issue #2764 - adapted ui to api changes (#2836)

This commit is contained in:
Heiko 2017-07-19 13:43:54 +02:00 committed by Frank Celler
parent d5e85bf987
commit b11fb4e084
1 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
/* jshint browser: true */
/* jshint unused: false */
/* global Backbone, frontendConfig, window, ArangoQuery, $, arangoHelper */
/* global Backbone, _, frontendConfig, window, ArangoQuery, $, arangoHelper */
(function () {
'use strict';
@ -37,6 +37,7 @@
if (this.activeUser === false || this.activeUser === null) {
this.activeUser = 'root';
}
console.log(response);
if (response.user === self.activeUser) {
try {
@ -44,6 +45,14 @@
toReturn = response.extra.queries;
}
} catch (e) {}
} else {
if (response.result && response.result instanceof Array) {
_.each(response.result, function (userobj) {
if (userobj.user === self.activeUser) {
toReturn = userobj.extra.queries;
}
});
}
}
return toReturn;