Updated the password middleware

This commit is contained in:
Mathias
2022-08-08 01:25:43 +02:00
parent 94459391e9
commit 672bdeae64

View File

@@ -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();