feat(chat): dynamic list of tavern mods (see http://goo.gl/9XhIZ6)
This commit is contained in:
@@ -168,6 +168,7 @@ module.exports.locals = function(req, res, next) {
|
||||
},
|
||||
siteVersion: siteVersion,
|
||||
Content: shared.content,
|
||||
mods: require('./models/user').mods,
|
||||
|
||||
tavern: tavern, // for world boss
|
||||
worldDmg: (tavern && tavern.quest && tavern.quest.extra && tavern.quest.extra.worldDmg) || {}
|
||||
|
||||
@@ -442,3 +442,7 @@ UserSchema.methods.unlink = function(options, cb) {
|
||||
|
||||
module.exports.schema = UserSchema;
|
||||
module.exports.model = mongoose.model("User", UserSchema);
|
||||
|
||||
mongoose.model("User").find({'contributor.admin':true},function(err,mods){
|
||||
module.exports.mods = _.map(mods,function(m){return ' '+ m.profile.name});
|
||||
});
|
||||
Reference in New Issue
Block a user