mirror of https://gitee.com/bigwinds/arangodb
remove obsolete, dysfunctional endpoints (#3135)
according to the manual and CHANGELOG we should have removed these endpoints in 3.0 already...
This commit is contained in:
parent
f3eb0c2ac0
commit
14389e856d
|
@ -436,72 +436,6 @@ actions.defineHttp({
|
|||
}
|
||||
});
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
// / @brief was docuBlock JSA_put_api_simple_first
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
actions.defineHttp({
|
||||
url: API + 'first',
|
||||
|
||||
callback: function (req, res) {
|
||||
try {
|
||||
if (req.requestType !== actions.PUT) {
|
||||
actions.resultUnsupported(req, res);
|
||||
} else {
|
||||
var body = actions.getJsonBody(req, res);
|
||||
var name = body.collection;
|
||||
var count = body.count;
|
||||
var collection = db._collection(name);
|
||||
|
||||
if (collection === null) {
|
||||
actions.collectionNotFound(req, res, name);
|
||||
}
|
||||
|
||||
if (count) {
|
||||
actions.resultOk(req, res, actions.HTTP_OK, { result: collection.first(count) });
|
||||
} else {
|
||||
actions.resultOk(req, res, actions.HTTP_OK, { result: collection.first() });
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
actions.resultException(req, res, err, undefined, false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
// / @brief was docuBlock JSA_put_api_simple_last
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
actions.defineHttp({
|
||||
url: API + 'last',
|
||||
|
||||
callback: function (req, res) {
|
||||
try {
|
||||
if (req.requestType !== actions.PUT) {
|
||||
actions.resultUnsupported(req, res);
|
||||
} else {
|
||||
var body = actions.getJsonBody(req, res);
|
||||
var name = body.collection;
|
||||
var count = body.count;
|
||||
var collection = db._collection(name);
|
||||
|
||||
if (collection === null) {
|
||||
actions.collectionNotFound(req, res, name);
|
||||
}
|
||||
|
||||
if (count) {
|
||||
actions.resultOk(req, res, actions.HTTP_OK, { result: collection.last(count) });
|
||||
} else {
|
||||
actions.resultOk(req, res, actions.HTTP_OK, { result: collection.last() });
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
actions.resultException(req, res, err, undefined, false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
// / @brief was docuBlock JSA_put_api_simple_range
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue