0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 14:12:40 +00:00

Fix outdated method in Admin API

This commit is contained in:
G.Ambatte
2023-02-03 19:28:20 +13:00
parent 208a341f27
commit 4a695eda87

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){