diff options
Diffstat (limited to 'routes/user.php')
| -rw-r--r-- | routes/user.php | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/routes/user.php b/routes/user.php deleted file mode 100644 index c0a632a..0000000 --- a/routes/user.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -use Digitigrade\HttpResponseStatus\NotFound; -use Digitigrade\Model\Actor; -use Digitigrade\Router; - -Router::getInstance()->mount('/@/:handle', function (array $args) { - if (str_contains($args['handle'], '@')) { - // remote actor - $actor = Actor::findByWebfinger($args['handle']); - } else { - // local actor - $actor = Actor::findLocalByHandle($args['handle']); - } - if ($actor == null || $actor->deleted) { - throw new NotFound("i don't know any user called " . $args['handle']); - } - render_template('actor_profile_page', ['actor' => $actor]); -});
\ No newline at end of file |
