Get a report

This commit is contained in:
Zalmoxisus
2016-08-17 18:33:07 +03:00
parent ff4245d965
commit 0a8576ab86
2 changed files with 18 additions and 0 deletions

View File

@ -25,6 +25,11 @@ module.exports.run = function(worker) {
if (!store) store = createStore(worker.options);
switch(req.body.op) {
case 'get':
store.get(req.body.id).then(function(r) {
res.send(r || {});
});
break;
default:
store.add(req.body).then(function(r) {
scServer.exchange.publish('log', req.body);