From 77930f168ddaa5890708b0cd38663e7e43acc75c Mon Sep 17 00:00:00 2001 From: Mitch Downey Date: Wed, 29 Nov 2023 21:49:36 -0600 Subject: [PATCH 1/2] Allow returning episode when liveItem ended --- src/controllers/episode.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/controllers/episode.ts b/src/controllers/episode.ts index 520d6aab..f6818323 100644 --- a/src/controllers/episode.ts +++ b/src/controllers/episode.ts @@ -36,9 +36,11 @@ const getEpisode = async (id) => { { relations } ) - if (!episode || !episode.podcast.isPublic) { + const isEndedLivestream = episode?.liveItem?.status === 'ended' + + if (!isEndedLivestream && (!episode || !episode.podcast.isPublic)) { throw new createError.NotFound('Episode not found') - } else if (!episode.isPublic) { + } else if (!isEndedLivestream && episode && !episode.isPublic) { // If a public version of the episode isn't available, check if a newer public version // of the episode is available and return that. // Otherwise, return the non-public version of the episode. Any episode that no longer appears From 59d732d4aec5e424ab0da1b8b5f310a5697726f2 Mon Sep 17 00:00:00 2001 From: Mitch Downey Date: Wed, 29 Nov 2023 21:49:53 -0600 Subject: [PATCH 2/2] Bump to version 4.15.13 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ffb49b4a..ee9344fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "podverse-api", - "version": "4.15.12", + "version": "4.15.13", "description": "Data API, database migration scripts, and backend services for all Podverse models.", "contributors": [ "Mitch Downey"