Linting
This commit is contained in:
2
app.js
2
app.js
@@ -22,7 +22,7 @@ app.use('/users', users);
|
||||
|
||||
// catch 404 and forward to error handler
|
||||
app.use(function (req, res, next) {
|
||||
console.log('[App::use] 404: Not Found', { args: arguments })
|
||||
console.log('[App::use] 404: Not Found', { args: arguments });
|
||||
var err = new Error('Not Found', { args: arguments });
|
||||
err.status = 404;
|
||||
next(err);
|
||||
|
||||
@@ -22,7 +22,7 @@ module.exports = {
|
||||
|
||||
all: (e) => {
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
var model = VendorModel
|
||||
ProfileModel
|
||||
.find({})
|
||||
.sort({ order: 1 })
|
||||
.populate({
|
||||
@@ -138,7 +138,7 @@ module.exports = {
|
||||
reject(err);
|
||||
}
|
||||
|
||||
if (result) {
|
||||
if (results) {
|
||||
resolve(results);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -139,7 +139,7 @@ module.exports = {
|
||||
if (e) {
|
||||
e.emit('forceReset', err, null);
|
||||
} else if (callback) {
|
||||
callback(result);
|
||||
callback(err);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ module.exports = {
|
||||
if (e) {
|
||||
e.emit('markUsed', err, null);
|
||||
} else {
|
||||
console.error('[ResetModel::markUsed] Error marking password reset token used', { token: result });
|
||||
console.error('[ResetModel::markUsed] Error marking password reset token used', { token: err });
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@ const RoleModel = Mongoose.model('roles', RoleSchema);
|
||||
|
||||
module.exports = {
|
||||
canRole: (e, roleId, action, callback) => {
|
||||
[initial, canElevate = false] = Array.isArray(action) ? action : [action];
|
||||
var [initial, canElevate = false] = Array.isArray(action) ? action : [action];
|
||||
|
||||
RoleModel.findById(roleId, (err, result) => {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user