Skip to content

Commit

Permalink
Revert "Disabled /SnapName/docs/ page. See #300"
Browse files Browse the repository at this point in the history
This reverts commit 098d517.
  • Loading branch information
snoyberg committed Nov 16, 2020
1 parent b44e922 commit 3bf0d89
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions src/Handler/StackageHome.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import RIO.Time (FormatTime)
import Import
import Stackage.Database
import Stackage.Snapshot.Diff
import Text.Blaze

getStackageHomeR :: SnapName -> Handler TypedContent
getStackageHomeR name =
Expand Down Expand Up @@ -156,19 +155,12 @@ getSnapshotPackagesR name = track "Handler.StackageHome.getSnapshotPackagesR" $
redirect $ SnapshotR name StackageHomeR

getDocsR :: SnapName -> Handler Html
getDocsR _name = do
sendResponseStatus status404 =<<
defaultLayout
(toWidget (preEscapedText
("Page has been disabled, see: " <>
"<a href=\"https://github.com/fpco/stackage-server/issues/300\">" <>
"github:fpco/stackage-server#300</a>")))
-- track "Handler.StackageHome.getDocsR" $ do
-- cacheSeconds $ 60 * 60 * 48
-- Entity sid _ <- lookupSnapshot name >>= maybe notFound return
-- mlis <- getSnapshotModules sid
-- render <- getUrlRender
-- let mliUrl mli = render $ haddockUrl name mli
-- defaultLayout $ do
-- setTitle $ toHtml $ "Module list for " ++ toPathPiece name
-- $(widgetFile "doc-list")
getDocsR name = track "Handler.StackageHome.getDocsR" $ do
cacheSeconds $ 60 * 60 * 48
Entity sid _ <- lookupSnapshot name >>= maybe notFound return
mlis <- getSnapshotModules sid
render <- getUrlRender
let mliUrl mli = render $ haddockUrl name mli
defaultLayout $ do
setTitle $ toHtml $ "Module list for " ++ toPathPiece name
$(widgetFile "doc-list")

0 comments on commit 3bf0d89

Please sign in to comment.