0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Add errorIndex.json

This commit is contained in:
G.Ambatte
2023-06-20 13:44:41 +12:00
parent 9e1d53a30c
commit ce538ebbfd
2 changed files with 4 additions and 4 deletions

View File

@@ -398,12 +398,9 @@ app.get('/account', asyncHandler(async (req, res, next)=>{
}));
app.get('/error', (req, res, next)=>{
console.log('ERROR PAGE');
const errorCookie = JSON.parse(req.cookies['HOMEBREWERY_Error']) || {};
const errorCookie = JSON.parse(req.cookies['HOMEBREWERY_Error']);
if(errorCookie){ res.cookie('HOMEBREWERY_Error', '', { maxAge: 0 }); }
console.log(errorCookie);
req.ogMeta = errorCookie.ogMeta;
req.brew = errorCookie.error;