diff --git a/lib/Controller/MetricsController.php b/lib/Controller/MetricsController.php new file mode 100644 index 0000000..40ec199 --- /dev/null +++ b/lib/Controller/MetricsController.php @@ -0,0 +1,45 @@ +podcastMetricsReader->metrics($this->userService->getUserUID()); + + foreach ($subscriptions as $id => $subscription) { + try { + $subscriptions[$id]['data'] = $this->podcastDataReader->getCachedOrFetchPodcastData($subscription->getUrl(), $this->userService->getUserUID()); + } catch (\Exception $e) { + continue; + } + } + + return new JSONResponse($subscriptions); + } +} diff --git a/src/store/subscriptions.ts b/src/store/subscriptions.ts index 37163d4..c08e971 100644 --- a/src/store/subscriptions.ts +++ b/src/store/subscriptions.ts @@ -24,7 +24,7 @@ export const useSubscriptions = defineStore('subscriptions', { } catch {} const metrics = await axios.get( - generateUrl('/apps/gpoddersync/personal_settings/metrics'), + generateUrl('/apps/repod/metrics'), ) this.subs = [...metrics.data.subscriptions]