Tags support

This commit is contained in:
Adolfo Reyna
2025-07-17 09:32:27 -04:00
parent 46a2fc5c2b
commit 64ca9df639
3 changed files with 17 additions and 3 deletions

View File

@@ -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({