mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: tweak api definition
This commit is contained in:
@ -80,13 +80,9 @@ const SignIn = () => {
|
||||
|
||||
try {
|
||||
actionBtnLoadingState.setLoading();
|
||||
const { user } = await authServiceClient.signIn({ username, password, neverExpire: remember });
|
||||
if (user) {
|
||||
await userStore.fetchCurrentUser();
|
||||
navigateTo("/");
|
||||
} else {
|
||||
toast.error(t("message.login-failed"));
|
||||
}
|
||||
await authServiceClient.signIn({ username, password, neverExpire: remember });
|
||||
await userStore.fetchCurrentUser();
|
||||
navigateTo("/");
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toast.error((error as ClientError).details || t("message.login-failed"));
|
||||
|
Reference in New Issue
Block a user