redirect /
This commit is contained in:
parent
d3932e8282
commit
399e30434f
1 changed files with 7 additions and 1 deletions
|
@ -14,7 +14,13 @@ import Web.Twain qualified as Twain
|
|||
|
||||
routes :: DB -> FilePath -> [Twain.Middleware]
|
||||
routes db detailsFile =
|
||||
[ -- Match actor
|
||||
[ Twain.get "/" do
|
||||
details <- liftIO $ fetchUserDetails detailsFile
|
||||
Twain.send $
|
||||
Twain.redirect302 $
|
||||
fromString ("/" <> details.username)
|
||||
|
||||
, -- Match actor
|
||||
Twain.get (Fedi.matchUser $ unsafePerformIO $ fetchUserDetails detailsFile) do
|
||||
request <- Twain.request
|
||||
if Fedi.checkContentTypeAccept request
|
||||
|
|
Loading…
Add table
Reference in a new issue