mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
fix(auth): show correct error when providing wrong current password at credential change (#1549)
This commit is contained in:
parent
7134e06379
commit
2a3dcfbf05
1 changed files with 5 additions and 0 deletions
|
@ -61,6 +61,11 @@ function Credentials() {
|
|||
|
||||
const updateUserMutation = useMutation({
|
||||
mutationFn: (data: UserUpdate) => APIClient.auth.updateUser(data),
|
||||
onError: () => {
|
||||
toast.custom((t) => (
|
||||
<Toast type="error" body="Error updating credentials. Did you provide the correct current password?" t={t} />
|
||||
));
|
||||
},
|
||||
onSuccess: () => {
|
||||
logoutMutation.mutate();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue