From ef20141e8f4e7d482b50005e6775eeb48e5bd879 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 28 Oct 2015 16:17:27 -0400 Subject: [PATCH] jshint --- public/src/modules/coverPhoto.js | 6 +++--- src/controllers/api.js | 12 +++++------- src/controllers/groups.js | 3 +-- src/groups/update.js | 4 +--- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/public/src/modules/coverPhoto.js b/public/src/modules/coverPhoto.js index 2c8f2db96b..6f210ce600 100644 --- a/public/src/modules/coverPhoto.js +++ b/public/src/modules/coverPhoto.js @@ -1,5 +1,5 @@ "use strict"; -/* globals define, app*/ +/* globals define, app, RELATIVE_PATH */ define('coverPhoto', [ 'uploader', @@ -29,7 +29,7 @@ define('coverPhoto', [ .backgroundDraggable({ axis: 'y', units: 'percent' - }) + }); }); coverEl @@ -84,7 +84,7 @@ define('coverPhoto', [ .backgroundDraggable({ axis: 'y', units: 'percent' - }) + }); } }; diff --git a/src/controllers/api.js b/src/controllers/api.js index 421673e7c4..9a6fbee238 100644 --- a/src/controllers/api.js +++ b/src/controllers/api.js @@ -112,13 +112,11 @@ apiController.getConfig = function(req, res, next) { apiController.renderWidgets = function(req, res, next) { - var async = require('async'), - areas = { - template: req.query.template, - locations: req.query.locations, - url: req.query.url - }, - renderedWidgets = []; + var areas = { + template: req.query.template, + locations: req.query.locations, + url: req.query.url + }; if (!areas.template || !areas.locations) { return res.status(200).json({}); diff --git a/src/controllers/groups.js b/src/controllers/groups.js index 8a6faaf755..111d41a752 100644 --- a/src/controllers/groups.js +++ b/src/controllers/groups.js @@ -3,7 +3,6 @@ var async = require('async'), nconf = require('nconf'), validator = require('validator'), - db = require('../database'), meta = require('../meta'), groups = require('../groups'), user = require('../user'), @@ -144,7 +143,7 @@ groupsController.uploadCover = function(req, res, next) { } res.json([{url: image.url.startsWith('http') ? image.url : nconf.get('relative_path') + image.url}]); - }) + }); }; module.exports = groupsController; diff --git a/src/groups/update.js b/src/groups/update.js index 4c5c30c193..a92ed3bc2b 100644 --- a/src/groups/update.js +++ b/src/groups/update.js @@ -104,9 +104,7 @@ module.exports = function(Groups) { async.parallel([ async.apply(db.setObjectField, 'group:' + groupName, 'hidden', hidden ? 1 : 0), async.apply(updateVisibility, groupName, hidden) - ], function(err, results) { - callback(err); - }); + ], callback); } Groups.updateCoverPosition = function(groupName, position, callback) {