added Function to recognise the frontend if the logged in user is an admin or not.
This commit is contained in:
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user