mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
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:
@@ -93,7 +93,9 @@ function hasBackupAuth (user, networkToRemove) {
|
||||
*/
|
||||
api.registerLocal = {
|
||||
method: 'POST',
|
||||
middlewares: [authWithHeaders(true)],
|
||||
middlewares: [authWithHeaders({
|
||||
optional: true,
|
||||
})],
|
||||
url: '/user/auth/local/register',
|
||||
async handler (req, res) {
|
||||
let existingUser = res.locals.user; // If adding local auth to social user
|
||||
@@ -299,7 +301,9 @@ function _passportProfile (network, accessToken) {
|
||||
// Called as a callback by Facebook (or other social providers). Internal route
|
||||
api.loginSocial = {
|
||||
method: 'POST',
|
||||
middlewares: [authWithHeaders(true)],
|
||||
middlewares: [authWithHeaders({
|
||||
optional: true,
|
||||
})],
|
||||
url: '/user/auth/social', // this isn't the most appropriate url but must be the same as v2
|
||||
async handler (req, res) {
|
||||
let existingUser = res.locals.user;
|
||||
|
||||
Reference in New Issue
Block a user