mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 22:31:15 +00:00
Add route for json download
This commit is contained in:
@@ -31,4 +31,19 @@ function route (app) {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
app.express.get('/:id.json', function (req, res, next) {
|
||||
app.webservice.task(req.params.id).get({}, function (err, task) {
|
||||
if (err) {
|
||||
return next();
|
||||
}
|
||||
app.webservice.task(req.params.id).results({}, function (err, results) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
task.results = results;
|
||||
res.send(task);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user