Remove user wrapping (#9960)

* remove user wrapping, fixes #9146

* update tests

* fix tests
This commit is contained in:
Matteo Pagliazzi
2018-02-09 13:46:55 +01:00
committed by GitHub
parent 8e24b0578e
commit f947d3562b
14 changed files with 59 additions and 190 deletions

View File

@@ -470,7 +470,7 @@ api.getUserAnonymized = {
let user = res.locals.user.toJSON();
user.stats.toNextLevel = common.tnl(user.stats.lvl);
user.stats.maxHealth = common.maxHealth;
user.stats.maxMP = res.locals.user._statsComputed.maxMP;
user.stats.maxMP = common.statsComputed(res.locals.user).maxMP;
delete user.apiToken;
if (user.auth) {