0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Update Buffer method

This commit is contained in:
G.Ambatte
2023-01-04 22:08:22 +13:00
parent 2b824839c3
commit 4a449c7895

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