Fix manual rss
All checks were successful
repod / nextcloud (push) Successful in 53s
repod / nodejs (push) Successful in 1m36s

This commit is contained in:
Michel Roux 2023-08-25 00:08:31 +02:00
parent 36ca216e80
commit 2a00a88a3e
2 changed files with 3 additions and 15 deletions

View File

@ -13,9 +13,6 @@
<script> <script>
import { NcAppNavigationNewItem } from '@nextcloud/vue' import { NcAppNavigationNewItem } from '@nextcloud/vue'
import Plus from 'vue-material-design-icons/Plus.vue' import Plus from 'vue-material-design-icons/Plus.vue'
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import { showError } from '@nextcloud/dialogs'
export default { export default {
name: 'AddRss', name: 'AddRss',
@ -30,17 +27,8 @@ export default {
} }
}, },
methods: { methods: {
async addSubscription(feedUrl) { addSubscription(feedUrl) {
try { this.$router.push(btoa(feedUrl))
this.loading = true
await axios.post(generateUrl('/apps/gpoddersync/subscription_change/create'), { add: [feedUrl], remove: [] })
} catch (e) {
console.error(e)
showError(t('Error while adding the feed'))
} finally {
this.loading = false
this.$store.dispatch('subscriptions/fetch')
}
}, },
}, },
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<ul> <ul>
<NcListItem v-for="feed in feeds" <NcListItem v-for="feed in feeds"
:key="`${feed.link}`" :key="feed.link"
:details="formatTimeAgo(new Date(feed.fetchedAtUnix*1000))" :details="formatTimeAgo(new Date(feed.fetchedAtUnix*1000))"
:name="feed.title" :name="feed.title"
:to="toUrl(feed.link)"> :to="toUrl(feed.link)">