Tags support
This commit is contained in:
@@ -74,13 +74,13 @@ const login = async function (req, res) {
|
||||
// Check if user is already logged in and redirect to root if so.
|
||||
const session_id = getSessionId(req);
|
||||
const user_sid = getUserId(req);
|
||||
const DB = await MongoDB.getDB;
|
||||
if (session_id && user_sid) {
|
||||
const userInfo = await DB.checkSessionOnDB(session_id, user_sid);
|
||||
if (userInfo) return res.redirect('/');
|
||||
}
|
||||
const username = req.body.username || req.query.username;
|
||||
const password = req.body.password || req.query.password || "";
|
||||
const DB = await MongoDB.getDB;
|
||||
const user = await DB.getUser(username);
|
||||
if (!user) {
|
||||
client_logger.capture({
|
||||
|
||||
Reference in New Issue
Block a user