🐛 bug fix

This commit is contained in:
Song
2021-03-28 13:26:16 +08:00
parent b22e2ce34c
commit e8dc765f6d
3 changed files with 11 additions and 3 deletions
+6
View File
@@ -33,6 +33,12 @@ router.get('/login', (req, res, next) => {
});
router.post('/login', async (req, res, next) => {
if (process.env.MODE === '1') {
return res.render('register', {
message: '当前运行模式为 Heroku 模式,该模式下禁止用户登录',
isErrorMessage: true,
});
}
let user = {
username: req.body.username,
password: req.body.password,