From 888256e9f6222abe1d6e97c1d4e54e961b59b89d Mon Sep 17 00:00:00 2001 From: Peter KW Date: Sun, 17 Mar 2024 19:38:51 +0100 Subject: [PATCH] Changed logincheck type and error clarification --- frontend/src/Components/LoginCheck.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/Components/LoginCheck.tsx b/frontend/src/Components/LoginCheck.tsx index 3658cbf..6a8a028 100644 --- a/frontend/src/Components/LoginCheck.tsx +++ b/frontend/src/Components/LoginCheck.tsx @@ -10,7 +10,7 @@ function LoginCheck(props: { username: string; password: string; setAuthority: Dispatch>; -}): 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;