mirror of https://gitee.com/bigwinds/arangodb
also fix jslint issues
This commit is contained in:
parent
61a80ed697
commit
1d944b97a4
|
@ -45,7 +45,7 @@ RestStatus RestDatabaseHandler::execute() {
|
|||
return getDatabases();
|
||||
} else if (type == rest::RequestType::POST) {
|
||||
if (!_vocbase->isSystem()) {
|
||||
generateError(rest::ResponseCode::BAD,
|
||||
generateError(GeneralResponse::responseCode(TRI_ERROR_ARANGO_USE_SYSTEM_DATABASE),
|
||||
TRI_ERROR_ARANGO_USE_SYSTEM_DATABASE);
|
||||
return RestStatus::DONE;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ RestStatus RestDatabaseHandler::createDatabase() {
|
|||
// //////////////////////////////////////////////////////////////////////////////
|
||||
RestStatus RestDatabaseHandler::deleteDatabase() {
|
||||
if (!_vocbase->isSystem()) {
|
||||
generateError(rest::ResponseCode::BAD,
|
||||
generateError(GeneralResponse::responseCode(TRI_ERROR_ARANGO_USE_SYSTEM_DATABASE),
|
||||
TRI_ERROR_ARANGO_USE_SYSTEM_DATABASE);
|
||||
return RestStatus::DONE;
|
||||
}
|
||||
|
|
|
@ -107,9 +107,7 @@ bool AuthInfo::parseUsers(VPackSlice const& slice) {
|
|||
}
|
||||
|
||||
AuthUserEntry auth = AuthUserEntry::fromDocument(s);
|
||||
if (auth.isActive()) {
|
||||
_authInfo.emplace(auth.username(), std::move(auth));
|
||||
}
|
||||
_authInfo.emplace(auth.username(), std::move(auth));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -160,7 +160,7 @@ const requests = [
|
|||
}
|
||||
}
|
||||
return bodies;
|
||||
}
|
||||
};
|
||||
|
||||
let res = pu.run.arangoshCmd(options, adbInstance, {}, [
|
||||
'--javascript.execute-string',
|
||||
|
@ -184,7 +184,7 @@ const requests = [
|
|||
]);
|
||||
|
||||
let bodies = run(requests.splice(0,4));
|
||||
requests[0][2] += bodies.pop().indexes.filter(idx => idx.type == 'hash')[0].id
|
||||
requests[0][2] += bodies.pop().indexes.filter(idx => idx.type === 'hash')[0].id;
|
||||
run(requests);
|
||||
|
||||
pu.shutdownInstance(adbInstance, options);
|
||||
|
|
|
@ -369,7 +369,6 @@ rest::ResponseCode GeneralResponse::responseCode(int code) {
|
|||
case TRI_ERROR_REPLICATION_INVALID_APPLIER_CONFIGURATION:
|
||||
case TRI_ERROR_REPLICATION_RUNNING:
|
||||
case TRI_ERROR_REPLICATION_NO_START_TICK:
|
||||
case TRI_ERROR_ARANGO_USE_SYSTEM_DATABASE:
|
||||
case TRI_ERROR_ARANGO_INVALID_KEY_GENERATOR:
|
||||
case TRI_ERROR_ARANGO_INVALID_EDGE_ATTRIBUTE:
|
||||
case TRI_ERROR_ARANGO_INDEX_DOCUMENT_ATTRIBUTE_MISSING:
|
||||
|
@ -415,6 +414,7 @@ rest::ResponseCode GeneralResponse::responseCode(int code) {
|
|||
case TRI_ERROR_GRAPH_EDGE_COL_DOES_NOT_EXIST:
|
||||
return ResponseCode::BAD;
|
||||
|
||||
case TRI_ERROR_ARANGO_USE_SYSTEM_DATABASE:
|
||||
case TRI_ERROR_ARANGO_READ_ONLY:
|
||||
case TRI_ERROR_FORBIDDEN:
|
||||
return ResponseCode::FORBIDDEN;
|
||||
|
|
Loading…
Reference in New Issue