remove console.log date debug log

This commit is contained in:
quoije
2025-02-11 21:42:45 -05:00
parent a4e1070382
commit f375046b9f
+1 -22
View File
@@ -7,27 +7,6 @@ const axios = require("axios");
const router = express.Router(); const router = express.Router();
let date_time = new Date();
// get current date
// adjust 0 before single digit date
let date = ("0" + date_time.getDate()).slice(-2);
// get current month
let month = ("0" + (date_time.getMonth() + 1)).slice(-2);
// get current year
let year = date_time.getFullYear();
// get current hours
let hours = date_time.getHours();
// get current minutes
let minutes = date_time.getMinutes();
// get current seconds
let seconds = date_time.getSeconds();
// Set password for verification // Set password for verification
const woof = process.env.DOG_NAMES ? process.env.DOG_NAMES.split(",") : []; const woof = process.env.DOG_NAMES ? process.env.DOG_NAMES.split(",") : [];
@@ -161,7 +140,7 @@ router.post("/login", async (req, res) => {
const isMatch = await bcrypt.compare(password, user.password); const isMatch = await bcrypt.compare(password, user.password);
if (!isMatch) return res.status(401).json({ message: "Informations d'identification non valides" }); if (!isMatch) return res.status(401).json({ message: "Informations d'identification non valides" });
console.log("[" + year + "-" + month + "-" + date + " " + hours + ":" + minutes + ":" + seconds + "] " + user.name + " logged in") console.log("[debug] " + user.name + " logged in")
// Check if the user role is 69 and set the admin flag // Check if the user role is 69 and set the admin flag
const isAdmin = user.role === 69; const isAdmin = user.role === 69;