0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00
Fix admin pages #2657
This commit is contained in:
Trevor Buckner
2023-03-23 12:49:15 -04:00
committed by GitHub
3 changed files with 7 additions and 4 deletions

View File

@@ -84,6 +84,10 @@ For a full record of development, visit our [Github Page](https://github.com/nat
{{taskList
##### G-Ambatte
* [x] Update server build scripts to fix Admin page
Fixes issues [#2657](https://github.com/naturalcrit/homebrewery/issues/2657)
* [x] Fix internal links inside `<div>` blocks not automatically receiving the `target=_self` attribute
Fixes issues [#2680](https://github.com/naturalcrit/homebrewery/issues/2680)

View File

@@ -12,8 +12,7 @@
"scripts": {
"dev": "node scripts/dev.js",
"quick": "node scripts/quick.js",
"build": "node scripts/buildHomebrew.js",
"buildall": "node scripts/buildHomebrew.js && node scripts/buildAdmin.js",
"build": "node scripts/buildHomebrew.js && node scripts/buildAdmin.js",
"builddev": "node scripts/buildHomebrew.js --dev",
"lint": "eslint --fix **/*.{js,jsx}",
"lint:dry": "eslint **/*.{js,jsx}",
@@ -28,7 +27,7 @@
"test:route": "jest tests/routes/static-pages.test.js --verbose",
"phb": "node scripts/phb.js",
"prod": "set NODE_ENV=production && npm run build",
"postinstall": "npm run buildall",
"postinstall": "npm run build",
"start": "node server.js"
},
"author": "stolksdorf",

View File

@@ -16,7 +16,7 @@ const mw = {
.status(401)
.send('Authorization Required');
}
const [username, password] = new Buffer(req.get('authorization').split(' ').pop(), 'base64')
const [username, password] = Buffer.from(req.get('authorization').split(' ').pop(), 'base64')
.toString('ascii')
.split(':');
if(process.env.ADMIN_USER === username && process.env.ADMIN_PASS === password){