Use DELETE method instead of GET for key removal

This commit is contained in:
Tankred Hase
2016-06-14 16:46:17 +02:00
parent 1a7b57777b
commit 7d93b882a5
4 changed files with 11 additions and 8 deletions

View File

@@ -56,7 +56,7 @@ class REST {
*/
*query(ctx) {
let op = ctx.query.op;
if (this[op]) {
if (op === 'verify' || op === 'verifyRemove') {
return yield this[op](ctx); // delegate operation
}
// do READ if no 'op' provided