first commit
This commit is contained in:
commit
aa7869eb33
386 files changed
+69375
No files matched your search
@@ -0,0 +1,22 @@
|
||||
const cache = require('../state/cache');
|
||||
const gekkoManager = cache.get('gekkos');
|
||||
|
||||
// Deletes a gekko
|
||||
// requires a post body with an id
|
||||
module.exports = function *() {
|
||||
|
||||
let id = this.request.body.id;
|
||||
|
||||
if(!id) {
|
||||
this.body = { status: 'not ok' }
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
gekkoManager.delete(id);
|
||||
} catch(e) {
|
||||
this.body = { status: e.message }
|
||||
}
|
||||
|
||||
this.body = { status: 'ok' };
|
||||
}
|
||||
Reference in new issue
Block a user