fix: add confirmation on deleting a subscription
This commit is contained in:
parent
f0e6392f06
commit
6adddf87a1
@ -68,15 +68,17 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async deleteSubscription() {
|
async deleteSubscription() {
|
||||||
try {
|
if (confirm(t('repod', 'Are you sure you want to delete this subscription?'))) {
|
||||||
this.loading = true
|
try {
|
||||||
await axios.post(generateUrl('/apps/gpoddersync/subscription_change/create'), { add: [], remove: [this.url] })
|
this.loading = true
|
||||||
} catch (e) {
|
await axios.post(generateUrl('/apps/gpoddersync/subscription_change/create'), { add: [], remove: [this.url] })
|
||||||
console.error(e)
|
} catch (e) {
|
||||||
showError(t('repod', 'Error while removing the feed'))
|
console.error(e)
|
||||||
} finally {
|
showError(t('repod', 'Error while removing the feed'))
|
||||||
this.loading = false
|
} finally {
|
||||||
this.$store.dispatch('subscriptions/fetch')
|
this.loading = false
|
||||||
|
this.$store.dispatch('subscriptions/fetch')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user