1
0
Fork 0

hotfix: fix examples in documentation, so the examples actually build

This commit is contained in:
jsteemann 2017-08-23 14:19:36 +02:00
parent 6c2ea0a246
commit 74f6dca8f1
1 changed files with 5 additions and 2 deletions

View File

@ -161,12 +161,13 @@ from the request.
@EXAMPLE_ARANGOSH_RUN{RestRevokeDatabase}
var users = require("@arangodb/users");
var theUser = "admin@myapp";
try { users.remove(theUser); } catch (err) {}
users.save(theUser, "secret")
var url = "/_api/user/" + theUser + "/database/_system";
var response = logCurlRequest('DELETE', url);
assert(response.code === 200);
assert(response.code === 202);
logRawResponse(response);
users.remove(theUser);
@ -226,6 +227,7 @@ Returned if you have *No access* server access level.
@EXAMPLE_ARANGOSH_RUN{RestGrantCollection}
var users = require("@arangodb/users");
var theUser = "admin@myapp";
try { users.remove(theUser); } catch (err) {}
users.save(theUser, "secret")
var url = "/_api/user/" + theUser + "/database/_system/reports";
@ -279,13 +281,14 @@ If there was an error
@EXAMPLE_ARANGOSH_RUN{RestRevokeCollection}
var users = require("@arangodb/users");
var theUser = "admin@myapp";
try { users.remove(theUser); } catch (err) {}
users.save(theUser, "secret")
users.grantCollection(theUser, "_system", "reports", "rw");
var url = "/_api/user/" + theUser + "/database/_system/reports";
var response = logCurlRequest('DELETE', url);
assert(response.code === 200);
assert(response.code === 202);
logRawResponse(response);
users.remove(theUser);