Add last result of each task to index page

This commit is contained in:
Rowan Manning
2013-09-16 10:18:35 +01:00
parent dbc6a0a5bc
commit 188852129a
4 changed files with 10 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ module.exports = route;
// Route definition
function route (app) {
app.express.get('/', function (req, res, next) {
app.webservice.tasks.get(function (err, tasks) {
app.webservice.tasks.get({lastres: true}, function (err, tasks) {
if (err) {
return next(err);
}

View File

@@ -5,7 +5,7 @@ module.exports = route;
// Route definition
function route (app) {
app.express.get('/:id', function (req, res, next) {
app.webservice.task(req.params.id).get(function (err, task) {
app.webservice.task(req.params.id).get({}, function (err, task) {
if (err) {
return next();
}