forked from external-repos/pa11y-dashboard
Fix JSCS errors
This commit is contained in:
14
route/new.js
14
route/new.js
@@ -20,10 +20,10 @@ var getStandards = require('../data/standards');
|
||||
module.exports = route;
|
||||
|
||||
// Route definition
|
||||
function route (app) {
|
||||
function route(app) {
|
||||
|
||||
app.express.get('/new', function (req, res) {
|
||||
var standards = getStandards().map(function (standard) {
|
||||
app.express.get('/new', function(req, res) {
|
||||
var standards = getStandards().map(function(standard) {
|
||||
if (standard.title === 'WCAG2AA') {
|
||||
standard.selected = true;
|
||||
}
|
||||
@@ -35,7 +35,7 @@ function route (app) {
|
||||
});
|
||||
});
|
||||
|
||||
app.express.post('/new', function (req, res) {
|
||||
app.express.post('/new', function(req, res) {
|
||||
var newTask = {
|
||||
name: req.body.name,
|
||||
url: req.body.url,
|
||||
@@ -45,13 +45,13 @@ function route (app) {
|
||||
username: req.body.username,
|
||||
password: req.body.password
|
||||
};
|
||||
app.webservice.tasks.create(newTask, function (err, task) {
|
||||
app.webservice.tasks.create(newTask, function(err, task) {
|
||||
if (err) {
|
||||
var standards = getStandards().map(function (standard) {
|
||||
var standards = getStandards().map(function(standard) {
|
||||
if (standard.title === newTask.standard) {
|
||||
standard.selected = true;
|
||||
}
|
||||
standard.rules = standard.rules.map(function (rule) {
|
||||
standard.rules = standard.rules.map(function(rule) {
|
||||
if (newTask.ignore.indexOf(rule.name) !== -1) {
|
||||
rule.ignored = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user