mirror of
https://github.com/gnmyt/myspeed.git
synced 2025-12-30 17:49:33 -06:00
Updated the password middleware
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
const config = require('../controller/config');
|
||||
const bcrypt = require('bcrypt');
|
||||
|
||||
module.exports = (req, res, next) => {
|
||||
let passwordHash = config.get("password").value;
|
||||
module.exports = async (req, res, next) => {
|
||||
let passwordHash = (await config.get("password")).value;
|
||||
|
||||
if (passwordHash === "none")
|
||||
return next();
|
||||
|
||||
Reference in New Issue
Block a user