mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-10 23:16:38 +00:00
Merge branch 'dev' of github.com:jln-brtn/pangolin into jln-brtn-dev
This commit is contained in:
@@ -84,16 +84,6 @@ export default function SetResourcePincodeForm({
|
||||
api.post<AxiosResponse<Resource>>(`/resource/${resourceId}/pincode`, {
|
||||
pincode: data.pincode
|
||||
})
|
||||
.catch((e) => {
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: t("resourceErrorPincodeSetup"),
|
||||
description: formatAxiosError(
|
||||
e,
|
||||
t("resourceErrorPincodeSetupDescription")
|
||||
)
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
toast({
|
||||
title: t("resourcePincodeSetup"),
|
||||
@@ -104,6 +94,16 @@ export default function SetResourcePincodeForm({
|
||||
onSetPincode();
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: t('resourceErrorPincodeSetup'),
|
||||
description: formatAxiosError(
|
||||
e,
|
||||
t('resourceErrorPincodeSetupDescription')
|
||||
)
|
||||
});
|
||||
})
|
||||
.finally(() => setLoading(false));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user