refac
This commit is contained in:
1 parent
5a2ff8b2e5
commit
d30a0531d4
4 files changed
+982
-24
No files matched your search
@@ -225,12 +225,14 @@
|
||||
if (automation) {
|
||||
await updateAutomationById(localStorage.token, automation.id, form);
|
||||
toast.success($i18n.t('Automation updated'));
|
||||
show = false;
|
||||
dispatch('save', { id: automation.id });
|
||||
} else {
|
||||
await createAutomation(localStorage.token, form);
|
||||
const created = await createAutomation(localStorage.token, form);
|
||||
toast.success($i18n.t('Automation created'));
|
||||
show = false;
|
||||
dispatch('save', { id: created?.id });
|
||||
}
|
||||
show = false;
|
||||
dispatch('save');
|
||||
} catch (e: any) {
|
||||
toast.error(e?.detail ?? `${e}` ?? 'Failed to save');
|
||||
} finally {
|
||||
|
||||
Reference in new issue
Block a user