0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-09 22:22:41 +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 {{taskList
##### G-Ambatte ##### 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 * [x] Fix internal links inside `<div>` blocks not automatically receiving the `target=_self` attribute
Fixes issues [#2680](https://github.com/naturalcrit/homebrewery/issues/2680) Fixes issues [#2680](https://github.com/naturalcrit/homebrewery/issues/2680)

View File

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

View File

@@ -16,7 +16,7 @@ const mw = {
.status(401) .status(401)
.send('Authorization Required'); .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') .toString('ascii')
.split(':'); .split(':');
if(process.env.ADMIN_USER === username && process.env.ADMIN_PASS === password){ if(process.env.ADMIN_USER === username && process.env.ADMIN_PASS === password){