From a124bd86571f9ec47d238e056bbd023686e24406 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Wed, 28 Aug 2024 16:59:22 -0400 Subject: [PATCH] I'm dumb. --- server/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/app.js b/server/app.js index ec5275a3b..90d14aa5b 100644 --- a/server/app.js +++ b/server/app.js @@ -358,6 +358,9 @@ app.get('/share/:id', asyncHandler(getBrew('share')), asyncHandler(async (req, r //Account Page 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'); @@ -366,9 +369,6 @@ app.get('/account', asyncHandler(async (req, res, next)=>{ error.page = data.title; return next(error); }; - - const data = {}; - data.title = 'Account Information Page'; let auth; let googleCount = [];