0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-24 23:48:10 +00:00

Merge branch 'experimentalNotificationDB' of https://github.com/G-Ambatte/homebrewery; branch 'master' of https://github.com/naturalcrit/homebrewery into experimentalNotificationDB

This commit is contained in:
Víctor Losada Hernández
2024-08-29 00:24:22 +02:00
2 changed files with 21 additions and 1 deletions

View File

@@ -360,6 +360,15 @@ app.get('/share/:id', asyncHandler(getBrew('share')), asyncHandler(async (req, r
app.get('/account', asyncHandler(async (req, res, next)=>{
const data = {};
data.title = 'Account Information Page';
if(!req.account) {
res.set('WWW-Authenticate', 'Bearer realm="Authorization Required"');
const error = new Error('No valid account');
error.status = 401;
error.HBErrorCode = '50';
error.page = data.title;
return next(error);
};
let auth;
let googleCount = [];