Skip to content

Commit

Permalink
Merge pull request #2658 from G-Ambatte/fixAdminPages-#2657
Browse files Browse the repository at this point in the history
Fix admin pages #2657
  • Loading branch information
calculuschild committed Mar 23, 2023
2 parents bda9b45 + 0436235 commit 5d77dea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion server/admin.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down

0 comments on commit 5d77dea

Please sign in to comment.