stringify into window.env only what we really need, save a lot of KBs

This commit is contained in:
Matteo Pagliazzi
2015-08-14 14:53:17 +02:00
parent 34dd4494ec
commit e1620bad2b
6 changed files with 44 additions and 22 deletions
+3 -1
View File
@@ -99,10 +99,12 @@ expressres.jsonstring = function(obj, headers, status) {
dataexport.avatarPage = function(req, res) {
var env = _.defaults({user:user}, res.locals.habitrpg);
User.findById(req.params.uuid).select('stats profile items achievements preferences backer contributor').exec(function(err, user){
res.render('avatar-static', {
title: user.profile.name,
env: _.defaults({user:user},res.locals.habitrpg)
env: env
});
})
};