1
0
Fork 0

remove old action

This commit is contained in:
Jan Steemann 2013-09-20 17:32:26 +02:00
parent 0587e80e3e
commit 1525e344f5
1 changed files with 0 additions and 55 deletions

View File

@ -650,61 +650,6 @@ actions.defineHttp({
}
});
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_get_admin_configure_endpoint
/// @brief configures a server endpoint
///
/// @RESTHEADER{POST /_admin/endpoint,configures a server endpoint}
///
////////////////////////////////////////////////////////////////////////////////
actions.defineHttp({
url : "_admin/endpoint",
context : "admin",
prefix : true,
callback : function (req, res) {
try {
var result;
if (req.requestType === actions.GET) {
actions.resultOk(req, res, actions.HTTP_OK, internal.listEndpoints());
}
else if (req.requestType === actions.POST) {
var body = actions.getJsonBody(req, res);
if (typeof body === undefined || typeof body.endpoint !== 'string') {
actions.resultBad(req, res, arangodb.ERROR_HTTP_BAD_PARAMETER,
"invalid endpoint value");
return;
}
result = internal.configureEndpoint(body.endpoint, body.databases || [ ]);
actions.resultOk(req, res, actions.HTTP_OK, { result: result });
}
else if (req.requestType === actions.DELETE) {
if (req.suffix.length !== 1) {
actions.resultBad(req, res, arangodb.ERROR_HTTP_BAD_PARAMETER,
"expected DELETE /" + this.url + "/<endpoint>");
return;
}
var endpoint = decodeURIComponent(req.suffix[0]);
result = internal.removeEndpoint(endpoint);
actions.resultOk(req, res, actions.HTTP_OK, { result: result });
}
else {
actions.resultUnsupported(req, res);
}
}
catch (err) {
actions.resultException(req, res, err, undefined, false);
}
}
});
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////