From bd40393aeb462da6a8716f0505e391f3dfd37fc6 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Tue, 29 Aug 2023 08:53:15 +0200 Subject: [PATCH] No need for data --- lib/Controller/PodcastController.php | 4 ++-- src/views/Feed.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Controller/PodcastController.php b/lib/Controller/PodcastController.php index b283d52..9c3a00d 100644 --- a/lib/Controller/PodcastController.php +++ b/lib/Controller/PodcastController.php @@ -29,7 +29,7 @@ class PodcastController extends Controller $podcast = $this->podcastDataReader->tryGetCachedPodcastData($url); if ($podcast) { - return new JSONResponse(['data' => $podcast]); + return new JSONResponse($podcast); } $client = $this->clientService->newClient(); @@ -43,6 +43,6 @@ class PodcastController extends Controller $podcast = PodcastData::parseRssXml((string) $feed->getBody()); $this->podcastDataReader->trySetCachedPodcastData($url, $podcast); - return new JSONResponse(['data' => $podcast], $statusCode); + return new JSONResponse($podcast, $statusCode); } } diff --git a/src/views/Feed.vue b/src/views/Feed.vue index d2787e7..689855a 100644 --- a/src/views/Feed.vue +++ b/src/views/Feed.vue @@ -49,7 +49,7 @@ export default { async mounted() { try { const podcastData = await axios.get(generateUrl('/apps/repod/podcast?url={url}', { url: this.url })) - this.feed = podcastData.data.data + this.feed = podcastData.data } catch (e) { this.failed = true console.error(e)