mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-20 22:07:15 +00:00
chore: fix error message
This commit is contained in:
parent
a4e91541cf
commit
38e5398cb9
@ -117,7 +117,7 @@ const CreateShortcutsButton = () => {
|
|||||||
setShowModal(false);
|
setShowModal(false);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
toast.error(error.response.data.message);
|
toast.error(error.details);
|
||||||
}
|
}
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
};
|
};
|
||||||
|
@ -54,7 +54,7 @@ const ChangePasswordDialog: React.FC<Props> = (props: Props) => {
|
|||||||
toast("Password changed");
|
toast("Password changed");
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
toast.error(error.response.data.message);
|
toast.error(error.details);
|
||||||
}
|
}
|
||||||
requestState.setFinish();
|
requestState.setFinish();
|
||||||
};
|
};
|
||||||
|
@ -80,7 +80,7 @@ const CreateAccessTokenDialog: React.FC<Props> = (props: Props) => {
|
|||||||
onClose();
|
onClose();
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
toast.error(error.response.data.message);
|
toast.error(error.details);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
|
|||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
toast.error(error.response.data.message);
|
toast.error(error.details);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ const CreateUserDialog: React.FC<Props> = (props: Props) => {
|
|||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
toast.error(error.response.data.message);
|
toast.error(error.details);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ const EditUserinfoDialog: React.FC<Props> = (props: Props) => {
|
|||||||
toast("User information updated");
|
toast("User information updated");
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
toast.error(error.response.data.message);
|
toast.error(error.details);
|
||||||
}
|
}
|
||||||
requestState.setFinish();
|
requestState.setFinish();
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@ const MemberSection = () => {
|
|||||||
await userStore.deleteUser(user.id);
|
await userStore.deleteUser(user.id);
|
||||||
toast.success(`User \`${user.nickname}\` deleted successfully`);
|
toast.success(`User \`${user.nickname}\` deleted successfully`);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
toast.error(`Failed to delete user \`${user.nickname}\`: ${error.response.data.message}`);
|
toast.error(`Failed to delete user \`${user.nickname}\`: ${error.details}`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -48,6 +48,7 @@ const SignIn: React.FC = () => {
|
|||||||
const { user, accessToken } = await authServiceClient.signIn({ email, password });
|
const { user, accessToken } = await authServiceClient.signIn({ email, password });
|
||||||
if (user) {
|
if (user) {
|
||||||
userStore.setCurrentUserId(user.id);
|
userStore.setCurrentUserId(user.id);
|
||||||
|
console.log("accessToken", accessToken);
|
||||||
setAccessToken(accessToken);
|
setAccessToken(accessToken);
|
||||||
await userStore.fetchCurrentUser();
|
await userStore.fetchCurrentUser();
|
||||||
navigateTo("/");
|
navigateTo("/");
|
||||||
@ -56,7 +57,7 @@ const SignIn: React.FC = () => {
|
|||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
toast.error(error.response.data.message);
|
toast.error(error.details);
|
||||||
}
|
}
|
||||||
actionBtnLoadingState.setFinish();
|
actionBtnLoadingState.setFinish();
|
||||||
};
|
};
|
||||||
|
@ -67,7 +67,7 @@ const SignUp: React.FC = () => {
|
|||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
toast.error(error.response.data.message);
|
toast.error(error.details);
|
||||||
}
|
}
|
||||||
actionBtnLoadingState.setFinish();
|
actionBtnLoadingState.setFinish();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user