mirror of https://gitee.com/bigwinds/arangodb
more documentation, moved toString to shell.js
This commit is contained in:
parent
1334654cd0
commit
49c33e85a0
|
@ -0,0 +1,23 @@
|
|||
defineAction("system/collections.json",
|
||||
function (req, res) {
|
||||
var colls;
|
||||
var coll;
|
||||
var result;
|
||||
|
||||
colls = db._collections();
|
||||
result = {
|
||||
path : db._path,
|
||||
collections : {}
|
||||
};
|
||||
|
||||
for (var i = 0; i < colls.length; ++i) {
|
||||
coll = colls[i];
|
||||
|
||||
result.collections[coll._name] = { name : coll._name, status : coll.status() };
|
||||
}
|
||||
|
||||
res.responseCode = 200;
|
||||
res.contentType = "application/json";
|
||||
res.body = toJson(result);
|
||||
}
|
||||
);
|
Loading…
Reference in New Issue