admin tools initial release

This commit is contained in:
MilosKozak
2015-09-24 11:21:08 +02:00
parent ca2b6976dc
commit da9cceb548
9 changed files with 277 additions and 3 deletions
+10
View File
@@ -38,6 +38,16 @@ function configure (app, wares, ctx) {
}
});
});
// delete record
api.delete('/devicestatus/:_id', wares.verifyAuthorization, function(req, res) {
ctx.devicestatus.remove(req.params._id, function (err, removed) {
if (err) {
res.sendJSONStatus(res, consts.HTTP_INTERNAL_ERROR, 'Mongo Error', err);
} else {
res.json(removed);
}
});
});
}