fix: remove cache from remote follow form to display error messages

This commit is contained in:
Yassine Doghri 2022-03-15 14:05:19 +00:00
commit 90e44437bd
6 changed files with 44 additions and 24 deletions

View file

@ -30,21 +30,13 @@ class ActorController extends FediverseActorController
$this->registerPodcastWebpageHit($this->actor->podcast->id);
}
$cacheName = "page_podcast-{$this->actor->username}_follow";
if (! ($cachedView = cache($cacheName))) {
helper(['form', 'components', 'svg']);
$data = [
// @phpstan-ignore-next-line
'metatags' => get_follow_metatags($this->actor),
'actor' => $this->actor,
];
helper(['form', 'components', 'svg']);
$data = [
// @phpstan-ignore-next-line
'metatags' => get_follow_metatags($this->actor),
'actor' => $this->actor,
];
return view('podcast/follow', $data, [
'cache' => DECADE,
'cache_name' => $cacheName,
]);
}
return $cachedView;
return view('podcast/follow', $data);
}
}