mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
start removing inbox from some routes (#10259)
This commit is contained in:
@@ -23,7 +23,9 @@ let api = {};
|
||||
api.readNotification = {
|
||||
method: 'POST',
|
||||
url: '/notifications/:notificationId/read',
|
||||
middlewares: [authWithHeaders()],
|
||||
middlewares: [authWithHeaders({
|
||||
userFieldsToExclude: ['inbox'],
|
||||
})],
|
||||
async handler (req, res) {
|
||||
let user = res.locals.user;
|
||||
|
||||
@@ -65,7 +67,9 @@ api.readNotification = {
|
||||
api.readNotifications = {
|
||||
method: 'POST',
|
||||
url: '/notifications/read',
|
||||
middlewares: [authWithHeaders()],
|
||||
middlewares: [authWithHeaders({
|
||||
userFieldsToExclude: ['inbox'],
|
||||
})],
|
||||
async handler (req, res) {
|
||||
let user = res.locals.user;
|
||||
|
||||
@@ -113,7 +117,9 @@ api.readNotifications = {
|
||||
api.seeNotification = {
|
||||
method: 'POST',
|
||||
url: '/notifications/:notificationId/see',
|
||||
middlewares: [authWithHeaders()],
|
||||
middlewares: [authWithHeaders({
|
||||
userFieldsToExclude: ['inbox'],
|
||||
})],
|
||||
async handler (req, res) {
|
||||
let user = res.locals.user;
|
||||
|
||||
@@ -162,7 +168,9 @@ api.seeNotification = {
|
||||
api.seeNotifications = {
|
||||
method: 'POST',
|
||||
url: '/notifications/see',
|
||||
middlewares: [authWithHeaders()],
|
||||
middlewares: [authWithHeaders({
|
||||
userFieldsToExclude: ['inbox'],
|
||||
})],
|
||||
async handler (req, res) {
|
||||
let user = res.locals.user;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user