mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 18:46:01 +01:00
jshint
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/* globals define, app*/
|
/* globals define, app, RELATIVE_PATH */
|
||||||
|
|
||||||
define('coverPhoto', [
|
define('coverPhoto', [
|
||||||
'uploader',
|
'uploader',
|
||||||
@@ -29,7 +29,7 @@ define('coverPhoto', [
|
|||||||
.backgroundDraggable({
|
.backgroundDraggable({
|
||||||
axis: 'y',
|
axis: 'y',
|
||||||
units: 'percent'
|
units: 'percent'
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
coverEl
|
coverEl
|
||||||
@@ -84,7 +84,7 @@ define('coverPhoto', [
|
|||||||
.backgroundDraggable({
|
.backgroundDraggable({
|
||||||
axis: 'y',
|
axis: 'y',
|
||||||
units: 'percent'
|
units: 'percent'
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -112,13 +112,11 @@ apiController.getConfig = function(req, res, next) {
|
|||||||
|
|
||||||
|
|
||||||
apiController.renderWidgets = function(req, res, next) {
|
apiController.renderWidgets = function(req, res, next) {
|
||||||
var async = require('async'),
|
var areas = {
|
||||||
areas = {
|
|
||||||
template: req.query.template,
|
template: req.query.template,
|
||||||
locations: req.query.locations,
|
locations: req.query.locations,
|
||||||
url: req.query.url
|
url: req.query.url
|
||||||
},
|
};
|
||||||
renderedWidgets = [];
|
|
||||||
|
|
||||||
if (!areas.template || !areas.locations) {
|
if (!areas.template || !areas.locations) {
|
||||||
return res.status(200).json({});
|
return res.status(200).json({});
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
var async = require('async'),
|
var async = require('async'),
|
||||||
nconf = require('nconf'),
|
nconf = require('nconf'),
|
||||||
validator = require('validator'),
|
validator = require('validator'),
|
||||||
db = require('../database'),
|
|
||||||
meta = require('../meta'),
|
meta = require('../meta'),
|
||||||
groups = require('../groups'),
|
groups = require('../groups'),
|
||||||
user = require('../user'),
|
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}]);
|
res.json([{url: image.url.startsWith('http') ? image.url : nconf.get('relative_path') + image.url}]);
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = groupsController;
|
module.exports = groupsController;
|
||||||
|
|||||||
@@ -104,9 +104,7 @@ module.exports = function(Groups) {
|
|||||||
async.parallel([
|
async.parallel([
|
||||||
async.apply(db.setObjectField, 'group:' + groupName, 'hidden', hidden ? 1 : 0),
|
async.apply(db.setObjectField, 'group:' + groupName, 'hidden', hidden ? 1 : 0),
|
||||||
async.apply(updateVisibility, groupName, hidden)
|
async.apply(updateVisibility, groupName, hidden)
|
||||||
], function(err, results) {
|
], callback);
|
||||||
callback(err);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Groups.updateCoverPosition = function(groupName, position, callback) {
|
Groups.updateCoverPosition = function(groupName, position, callback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user