fix: add confirmation on deleting a subscription

This commit is contained in:
Michel Roux 2024-01-10 16:36:37 +01:00
parent f0e6392f06
commit 6adddf87a1

View File

@ -68,6 +68,7 @@ export default {
}, },
methods: { methods: {
async deleteSubscription() { async deleteSubscription() {
if (confirm(t('repod', 'Are you sure you want to delete this subscription?'))) {
try { try {
this.loading = true this.loading = true
await axios.post(generateUrl('/apps/gpoddersync/subscription_change/create'), { add: [], remove: [this.url] }) await axios.post(generateUrl('/apps/gpoddersync/subscription_change/create'), { add: [], remove: [this.url] })
@ -78,6 +79,7 @@ export default {
this.loading = false this.loading = false
this.$store.dispatch('subscriptions/fetch') this.$store.dispatch('subscriptions/fetch')
} }
}
}, },
}, },
} }