Comment tweaks
This commit is contained in:
@@ -21,6 +21,7 @@ const defaultAdminAccount = async () => {
|
||||
hash: await bcrypt.hash('password', await bcrypt.genSalt(11))
|
||||
});
|
||||
|
||||
//TODO: (1) Replace this default admin account password with UUID
|
||||
console.log(`Created default admin account (email: admin@${process.env.WEB_ADDRESS}; password: password)`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ const router = express.Router();
|
||||
//middleware
|
||||
router.use((req, res, next) => {
|
||||
//make sure the account is an admin
|
||||
if (req.cookies['admin'] !== process.env.SESSION_ADMIN) {
|
||||
if (req.cookies['admin'] !== process.env.SESSION_ADMIN) { //TODO: Eew not good.
|
||||
return res.status(401).send('invalid admin status');
|
||||
} else {
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user