fix: remove useless try catch
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
98674e528c
commit
a3ea359b01
|
@ -16,24 +16,14 @@ const actions = {
|
|||
clone: async () => {
|
||||
const opts = { message: t('Zone cloned'), type: 'positive' };
|
||||
|
||||
try {
|
||||
const { data } = await axios.post(`Zones/${zoneId}/clone`, {});
|
||||
notify(opts);
|
||||
push(`/zone/${data.id}/basic-data`);
|
||||
} catch (e) {
|
||||
opts.message = t('It was not able to clone the zone');
|
||||
opts.type = 'negative';
|
||||
}
|
||||
const { data } = await axios.post(`Zones/${zoneId}/clone`, {});
|
||||
notify(opts);
|
||||
push(`/zone/${data.id}/basic-data`);
|
||||
},
|
||||
remove: async () => {
|
||||
try {
|
||||
await axios.post(`Zones/${zoneId}/deleteZone`);
|
||||
|
||||
notify({ message: t('Zone deleted'), type: 'positive' });
|
||||
push({ name: 'ZoneList' });
|
||||
} catch (e) {
|
||||
notify({ message: e.message, type: 'negative' });
|
||||
}
|
||||
await axios.post(`Zones/${zoneId}/deleteZone`);
|
||||
notify({ message: t('Zone deleted'), type: 'positive' });
|
||||
push({ name: 'ZoneList' });
|
||||
},
|
||||
};
|
||||
function openConfirmDialog(callback) {
|
||||
|
|
Loading…
Reference in New Issue