mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-07 02:20:34 +00:00
Merge branch 'dev' of github.com:jln-brtn/pangolin into jln-brtn-dev
This commit is contained in:
@@ -78,16 +78,6 @@ export default function SetResourcePasswordForm({
|
||||
api.post<AxiosResponse<Resource>>(`/resource/${resourceId}/password`, {
|
||||
password: data.password
|
||||
})
|
||||
.catch((e) => {
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: t("resourceErrorPasswordSetup"),
|
||||
description: formatAxiosError(
|
||||
e,
|
||||
t("resourceErrorPasswordSetupDescription")
|
||||
)
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
toast({
|
||||
title: t("resourcePasswordSetup"),
|
||||
@@ -98,6 +88,16 @@ export default function SetResourcePasswordForm({
|
||||
onSetPassword();
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: t('resourceErrorPasswordSetup'),
|
||||
description: formatAxiosError(
|
||||
e,
|
||||
t('resourceErrorPasswordSetupDescription')
|
||||
)
|
||||
});
|
||||
})
|
||||
.finally(() => setLoading(false));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user