Add errorIndex.json

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

No files matched your search

+1 -4
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;