first commit

This commit is contained in:
Francois Klieber committed 2021-06-06 20:25:14 +02:00
commit aa7869eb33
386 files changed
+69375

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
const cache = require('../state/cache');
const gekkoManager = cache.get('gekkos');
// stops 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;
}
let stopped = gekkoManager.stop(id);
if(!stopped) {
this.body = { status: 'not ok' }
return;
}
this.body = { status: 'ok' };
}