added Function to recognise the frontend if the logged in user is an admin or not.

This commit is contained in:
2025-07-24 11:30:00 +02:00
parent 85113daf45
commit d1bb95c2a8
3 changed files with 9 additions and 12 deletions

View File

@@ -50,6 +50,8 @@ const LoginCard: React.FC<LoginCardProps> = ({ onClose }) => {
document.location.reload();
} else if (response.status === 401) {
alert("Invalid credentials");
} else if (response.status === 403) {
alert("You are not an Admin!");
}
})
.catch((error) => {