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

+26
View File
@@ -0,0 +1,26 @@
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'
};
}
}