From dc1deda3a02e3ebc31d4ed3a256580469cf83c0e Mon Sep 17 00:00:00 2001 From: winter Date: Mon, 31 Mar 2025 22:01:50 +0100 Subject: add button to reload actors from remote instance --- routes/actor_profile_fragment.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'routes/actor_profile_fragment.php') diff --git a/routes/actor_profile_fragment.php b/routes/actor_profile_fragment.php index debead0..b93556a 100644 --- a/routes/actor_profile_fragment.php +++ b/routes/actor_profile_fragment.php @@ -11,7 +11,11 @@ use Digitigrade\Router; use Digitigrade\StorageProvider\FilesystemStorage; Router::getInstance()->mount('/fragment/actor/:id', function (array $args) { - render_template('actor/profile', ['actor' => Actor::find($args['id'])]); + $actor = Actor::find($args['id']); + if (isset($_GET['forceRefetch'])) { + $actor = Actor::findByUri($actor->uri, forceRefetch: true); + } + render_template('actor/profile', ['actor' => $actor]); }); Router::getInstance()->mount('/fragment/actor/:id/followButton', function (array $args) { -- cgit v1.3