Changed logincheck type and error clarification

This commit is contained in:
Peter KW 2024-03-17 19:38:51 +01:00
parent 1977125923
commit 888256e9f6

View file

@ -10,7 +10,7 @@ function LoginCheck(props: {
username: string;
password: string;
setAuthority: Dispatch<SetStateAction<number>>;
}): number {
}): void {
const user: NewUser = {
username: props.username,
password: props.password,
@ -42,14 +42,12 @@ function LoginCheck(props: {
console.error("Token was undefined");
}
} else {
console.error("Token could not be fetched");
console.error("Token could not be fetched/No such user");
}
})
.catch((error) => {
console.error("An error occurred during login:", error);
});
return 0;
}
export default LoginCheck;