Remove inbox from more routes (#10300)

* remove inbox from user/stats routes

* remove inbox from news routes

* change signature for authWithHeaders

* do not load inbox in coupons routes

* do not load inbox in challenge routes

* do not load inbox in some members routes

* do not load inbox in chat routes
This commit is contained in:
Matteo Pagliazzi
2018-04-30 17:36:41 +02:00
committed by GitHub
parent 5f0ef2d8f0
commit 8b9bf88fa0
9 changed files with 96 additions and 34 deletions

View File

@@ -60,7 +60,9 @@ api.getNews = {
*/
api.tellMeLaterNews = {
method: 'POST',
middlewares: [authWithHeaders()],
middlewares: [authWithHeaders({
userFieldsToExclude: ['inbox'],
})],
url: '/news/tell-me-later',
async handler (req, res) {
const user = res.locals.user;