From f40c5e17cafd85486de3c2323d82c0050af91c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Thu, 12 Sep 2024 14:04:35 +0200 Subject: [PATCH] change to 401 --- client/homebrew/pages/errorPage/errors/errorIndex.js | 12 ++++-------- server/admin.api.js | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index d12a18576..5e478bc58 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -154,17 +154,13 @@ const errorIndex = (props)=>{ '401': dedent` ## Authorization Required - - You need to provide correct credentials to access this page. + You need to provide correct administrator credentials to access this page. : - - This is an administrator only page to manage the site, if you should not have access, leave inmediately. - : - - If you have received instructions to open this page, report - as so at our subreddit or discord you will find in the home page. + If you should have access but are not able to log-in, please reach out via + [reddit mod mail](https://old.reddit.com/message/compose/?to=/r/homebrewery) or + in the [hb_issues channel of the Discord of Many Things server](https://discord.gg/domt). `, '403': dedent` ## Access Denied diff --git a/server/admin.api.js b/server/admin.api.js index 6880b7c68..ca0f6155f 100644 --- a/server/admin.api.js +++ b/server/admin.api.js @@ -32,7 +32,7 @@ const mw = { if (process.env.ADMIN_USER === username && process.env.ADMIN_PASS === password) { return next(); } - throw { HBErrorCode: '403', code: 403, message: 'Access denied' }; + throw { HBErrorCode: '403', code: 401, message: 'Access denied' }; } ] };