diff options
| author | winter | 2024-12-20 19:12:12 +0000 |
|---|---|---|
| committer | winter | 2024-12-20 19:12:12 +0000 |
| commit | 3272de09352d1583ea817187d13a7a548e360296 (patch) | |
| tree | 747d621c8e9543dbdf9b81bd751a8a6e153477f8 /routes/homepage.php | |
| parent | d9ae605537792e93a535851c32d14393a645fc75 (diff) | |
super ultra mega basic global timeline
Diffstat (limited to 'routes/homepage.php')
| -rw-r--r-- | routes/homepage.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/routes/homepage.php b/routes/homepage.php index 5fbc102..94fe4c9 100644 --- a/routes/homepage.php +++ b/routes/homepage.php @@ -1,12 +1,12 @@ <?php +use Digitigrade\HttpResponseStatus\NotFound; +use Digitigrade\HttpResponseStatus\TemporaryRedirect; use Digitigrade\Router; Router::getInstance()->mount('/', function (array $args) { - echo '<h1>home</h1>'; -}); - -Router::getInstance()->mount('/:username', function (array $args) { ?> - <h1><?= $args['username'] ?></h1> - <p>todo!</p> -<?php });
\ No newline at end of file + if (str_contains($_SERVER['HTTP_ACCEPT'] ?? '', 'text/html')) { + throw new TemporaryRedirect(path_to_uri('/feed/global')); + } + throw new NotFound(); +});
\ No newline at end of file |
