Add the ability to run tasks ad-hoc

This commit is contained in:
Rowan Manning
2013-10-03 14:18:31 +01:00
parent cd38bd0586
commit c2ed1beb0e
7 changed files with 37 additions and 3 deletions

17
route/task/run.js Normal file
View File

@@ -0,0 +1,17 @@
'use strict';
module.exports = route;
// Route definition
function route (app) {
app.express.get('/:id/run', function (req, res, next) {
app.webservice.task(req.params.id).run(function (err, task) {
if (err) {
return next();
}
res.redirect('/' + req.params.id + '?running');
});
});
}