mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 22:31:15 +00:00
19 lines
361 B
JavaScript
19 lines
361 B
JavaScript
'use strict';
|
|
|
|
module.exports = route;
|
|
|
|
// Route definition
|
|
function route (app) {
|
|
app.express.get('/', function (req, res, next) {
|
|
app.webservice.tasks.get({lastres: true}, function (err, tasks) {
|
|
if (err) {
|
|
return next(err);
|
|
}
|
|
res.render('index', {
|
|
tasks: tasks,
|
|
deleted: (typeof req.query.deleted !== 'undefined')
|
|
});
|
|
});
|
|
});
|
|
}
|