feat: refactor user handling and integrate toast notifications for login feedback
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user