Fix JSCS errors

This commit is contained in:
Rowan Manning
2016-04-25 21:26:59 +01:00
parent 90328cfa39
commit ea48d6a6fd
31 changed files with 366 additions and 364 deletions

View File

@@ -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;
}