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