1
0
Fork 0

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:
Jan 2017-08-25 14:00:34 +02:00 committed by Frank Celler
parent f3eb0c2ac0
commit 14389e856d
1 changed files with 0 additions and 66 deletions

View File

@ -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
// //////////////////////////////////////////////////////////////////////////////