From be25e900097fc68dcccdc46c0744957d4a54296f Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 26 Sep 2022 00:34:54 +1300 Subject: [PATCH] Change variable name --- server/app.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/app.js b/server/app.js index d310aafd4..d95b48474 100644 --- a/server/app.js +++ b/server/app.js @@ -1,4 +1,4 @@ -/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/ +/*eslint max-lines: ["warn", {"max": 400, "skipBlankLines": true, "skipComments": true}]*/ // Set working directory to project root process.chdir(`${__dirname}/..`); @@ -263,9 +263,9 @@ app.get('/print/:id', asyncHandler(getBrew('share')), (req, res, next)=>{ }); //Account Page -app.get('/ui/account', asyncHandler(async (req, res, next)=>{ - const brew = {}; - brew.title = 'ACCOUNT INFORMATION PAGE'; +app.get('/account', asyncHandler(async (req, res, next)=>{ + const data = {}; + data.title = 'ACCOUNT INFORMATION PAGE'; let auth; let files; @@ -294,7 +294,7 @@ app.get('/ui/account', asyncHandler(async (req, res, next)=>{ console.log(err); }); - brew.uiItems = { + data.uiItems = { username : req.account.username, issued : req.account.issued, mongoCount : brews.length, @@ -304,7 +304,7 @@ app.get('/ui/account', asyncHandler(async (req, res, next)=>{ }; } - req.brew = brew; + req.brew = data; return next(); }));