From 242352c4d9cd936de14e8e8a5d78ebf1287b1f95 Mon Sep 17 00:00:00 2001 From: Yassine Doghri Date: Thu, 29 Sep 2022 11:10:11 +0000 Subject: [PATCH] fix(premium-podcasts): remove cache in unlock form + redirect to podcast if podcast is not premium --- modules/PremiumPodcasts/Controllers/LockController.php | 8 +++++--- themes/cp_app/podcast/unlock.php | 6 ++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/PremiumPodcasts/Controllers/LockController.php b/modules/PremiumPodcasts/Controllers/LockController.php index 2a507273..68899039 100644 --- a/modules/PremiumPodcasts/Controllers/LockController.php +++ b/modules/PremiumPodcasts/Controllers/LockController.php @@ -43,11 +43,13 @@ class LockController extends BaseController return $this->{$method}(); } - public function index(): string + public function index(): RedirectResponse|string { + if (! $this->podcast->is_premium) { + return redirect()->route('podcast-activity', [$this->podcast->handle]); + } + $data = [ - // TODO: metatags for locked premium podcasts - 'metatags' => '', 'podcast' => $this->podcast, ]; diff --git a/themes/cp_app/podcast/unlock.php b/themes/cp_app/podcast/unlock.php index 78ec988c..aaa3d0ec 100644 --- a/themes/cp_app/podcast/unlock.php +++ b/themes/cp_app/podcast/unlock.php @@ -22,8 +22,6 @@ } - - ' /> asset('styles/index.css', 'css') ?> @@ -77,8 +75,8 @@
<?= esc($podcast->title) ?>
-

title) ?>@handle) ?>

-
+
title) ?>@handle) ?>
+
parental_advisory === 'explicit', 'mr-1') ?> $podcast->actor->followers_count,