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 () => {
|
clone: async () => {
|
||||||
const opts = { message: t('Zone cloned'), type: 'positive' };
|
const opts = { message: t('Zone cloned'), type: 'positive' };
|
||||||
|
|
||||||
try {
|
|
||||||
const { data } = await axios.post(`Zones/${zoneId}/clone`, {});
|
const { data } = await axios.post(`Zones/${zoneId}/clone`, {});
|
||||||
notify(opts);
|
notify(opts);
|
||||||
push(`/zone/${data.id}/basic-data`);
|
push(`/zone/${data.id}/basic-data`);
|
||||||
} catch (e) {
|
|
||||||
opts.message = t('It was not able to clone the zone');
|
|
||||||
opts.type = 'negative';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
remove: async () => {
|
remove: async () => {
|
||||||
try {
|
|
||||||
await axios.post(`Zones/${zoneId}/deleteZone`);
|
await axios.post(`Zones/${zoneId}/deleteZone`);
|
||||||
|
|
||||||
notify({ message: t('Zone deleted'), type: 'positive' });
|
notify({ message: t('Zone deleted'), type: 'positive' });
|
||||||
push({ name: 'ZoneList' });
|
push({ name: 'ZoneList' });
|
||||||
} catch (e) {
|
|
||||||
notify({ message: e.message, type: 'negative' });
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
function openConfirmDialog(callback) {
|
function openConfirmDialog(callback) {
|
||||||
|
|
Loading…
Reference in New Issue