redirect /
This commit is contained in:
parent
d3932e8282
commit
399e30434f
@ -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…
Reference in New Issue
Block a user