start removing inbox from some routes (#10259)

This commit is contained in:
Matteo Pagliazzi
2018-04-16 18:43:09 +02:00
committed by GitHub
parent a1c9ebd661
commit 76a10d6cf9
6 changed files with 69 additions and 23 deletions

View File

@@ -60,7 +60,9 @@ let api = {};
api.getPatrons = {
method: 'GET',
url: '/hall/patrons',
middlewares: [authWithHeaders()],
middlewares: [authWithHeaders({
userFieldsToExclude: ['inbox'],
})],
async handler (req, res) {
req.checkQuery('page', res.t('pageMustBeNumber')).optional().isNumeric();
@@ -120,7 +122,9 @@ api.getPatrons = {
api.getHeroes = {
method: 'GET',
url: '/hall/heroes',
middlewares: [authWithHeaders()],
middlewares: [authWithHeaders({
userFieldsToExclude: ['inbox'],
})],
async handler (req, res) {
let heroes = await User
.find({