mirror of https://gitee.com/bigwinds/arangodb
issue #1402: Query export in web frontend not working
This commit is contained in:
parent
289cdfcd43
commit
8dbd76a97e
|
@ -232,7 +232,12 @@ controller.get("/query/download/:user", function(req, res) {
|
|||
res.set("Content-Type", "application/json");
|
||||
res.set("Content-Disposition", "attachment; filename=queries.json");
|
||||
|
||||
res.json(result.userData.queries);
|
||||
if (result === null || result === undefined) {
|
||||
res.json([]);
|
||||
}
|
||||
else {
|
||||
res.json(result.userData.queries || []);
|
||||
}
|
||||
|
||||
}).summary("Download all user queries")
|
||||
.notes("This function downloads all user queries from the given user");
|
||||
|
|
|
@ -347,9 +347,9 @@
|
|||
|
||||
$.ajax("whoAmI?_=" + Date.now(), {async:false}).done(
|
||||
function(data) {
|
||||
name = data.name;
|
||||
name = data.user;
|
||||
|
||||
if (name === null) {
|
||||
if (name === null || name === false) {
|
||||
name = "root";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue