Changed logincheck type and error clarification
This commit is contained in:
parent
1977125923
commit
888256e9f6
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue