mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 22:31:15 +00:00
Use the ES6 linting rules from the website (#138)
This commit is contained in:
@@ -5,20 +5,20 @@ module.exports = route;
|
||||
// Route definition
|
||||
function route(app) {
|
||||
|
||||
app.express.post('/:id/ignore', function(req, res, next) {
|
||||
app.webservice.task(req.params.id).get({}, function(err, task) {
|
||||
app.express.post('/:id/ignore', (req, res, next) => {
|
||||
app.webservice.task(req.params.id).get({}, (err, task) => {
|
||||
if (err) {
|
||||
return next();
|
||||
}
|
||||
var edit = {
|
||||
const edit = {
|
||||
name: task.name,
|
||||
ignore: task.ignore
|
||||
};
|
||||
if (typeof req.body.rule === 'string') {
|
||||
edit.ignore.push(req.body.rule);
|
||||
}
|
||||
app.webservice.task(req.params.id).edit(edit, function() {
|
||||
res.redirect('/' + req.params.id + '?rule-ignored');
|
||||
app.webservice.task(req.params.id).edit(edit, () => {
|
||||
res.redirect(`/${req.params.id}?rule-ignored`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user