This repository has been archived on 2025-10-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
gekko/web/routes/apiKeys.js
T
2021-06-06 20:25:14 +02:00

26 lines
481 B
JavaScript

const cache = require('../state/cache');
const manager = cache.get('apiKeyManager');
module.exports = {
get: function *() {
this.body = manager.get();
},
add: function *() {
const content = this.request.body;
manager.add(content.exchange, content.values);
this.body = {
status: 'ok'
};
},
remove: function *() {
const exchange = this.request.body.exchange;
manager.remove(exchange);
this.body = {
status: 'ok'
};
}
}