fix issue with language being undefined, refactoring auth middleware, new tests

This commit is contained in:
Matteo Pagliazzi
2019-05-15 16:54:55 +02:00
parent 8cce38ede1
commit eff8db0afd
7 changed files with 143 additions and 91 deletions
+2 -1
View File
@@ -375,7 +375,8 @@ api.getGroup = {
method: 'GET',
url: '/groups/:groupId',
middlewares: [authWithHeaders({
userFieldsToInclude: ['_id', 'party', 'guilds', 'contributor'],
// Some fields (including _id, preferences) are always loaded (see middlewares/auth)
userFieldsToInclude: ['party', 'guilds', 'contributor'],
})],
async handler (req, res) {
let user = res.locals.user;