feat: refactor user handling and integrate toast notifications for login feedback

This commit is contained in:
2025-07-24 14:12:06 +02:00
parent 06dd1fc80e
commit b69b446e3d
9 changed files with 207 additions and 179 deletions

View File

@@ -50,7 +50,7 @@ app.get("/api/getAllUsers", authenticate, async (req, res) => {
if (req.user.role === "admin") {
getAllUsers()
.then((users) => {
res.status(200).json(users).reload();
res.status(200).json(users);
})
.catch((err) => {
console.error("Error fetching users:", err);