diff --git a/changelog.md b/changelog.md index aed9390c7..60719b916 100644 --- a/changelog.md +++ b/changelog.md @@ -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 `
` blocks not automatically receiving the `target=_self` attribute Fixes issues [#2680](https://github.com/naturalcrit/homebrewery/issues/2680) diff --git a/package.json b/package.json index 2a659af70..818304156 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/server/admin.api.js b/server/admin.api.js index 8570ea1bc..b9b2afbd7 100644 --- a/server/admin.api.js +++ b/server/admin.api.js @@ -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){