diff --git a/src/Yesod/ActivityPub.hs b/src/Yesod/ActivityPub.hs index bee49ee..4e6023d 100644 --- a/src/Yesod/ActivityPub.hs +++ b/src/Yesod/ActivityPub.hs @@ -26,6 +26,7 @@ import Prelude import Control.Exception import Control.Monad.Logger.CallStack import Data.ByteString (ByteString) +import Data.Foldable import Data.List.NonEmpty (NonEmpty) import Data.Text (Text) import Network.HTTP.Client @@ -131,4 +132,14 @@ provideHtmlAndAP object widget = do [whamlet|
#{encodePrettyToLazyText doc} |] - _ -> widget + _ -> do + widget + mroute <- getCurrentRoute + for_ mroute $ \ route -> do + params <- reqGetParams <$> getRequest + let pj = ("prettyjson", "true") + [whamlet| +