mirror of https://gitee.com/bigwinds/arangodb
parent
d5e85bf987
commit
b11fb4e084
|
@ -1,6 +1,6 @@
|
||||||
/* jshint browser: true */
|
/* jshint browser: true */
|
||||||
/* jshint unused: false */
|
/* jshint unused: false */
|
||||||
/* global Backbone, frontendConfig, window, ArangoQuery, $, arangoHelper */
|
/* global Backbone, _, frontendConfig, window, ArangoQuery, $, arangoHelper */
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@
|
||||||
if (this.activeUser === false || this.activeUser === null) {
|
if (this.activeUser === false || this.activeUser === null) {
|
||||||
this.activeUser = 'root';
|
this.activeUser = 'root';
|
||||||
}
|
}
|
||||||
|
console.log(response);
|
||||||
|
|
||||||
if (response.user === self.activeUser) {
|
if (response.user === self.activeUser) {
|
||||||
try {
|
try {
|
||||||
|
@ -44,6 +45,14 @@
|
||||||
toReturn = response.extra.queries;
|
toReturn = response.extra.queries;
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} 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;
|
return toReturn;
|
||||||
|
|
Loading…
Reference in New Issue