mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-06-10 00:02:33 +02:00
Re-enable Accept-varying content for /snapshots
Fixes https://github.com/commercialhaskell/stackage-server/issues/365
This commit is contained in:
parent
e84c1a82be
commit
51c2939880
@ -72,13 +72,19 @@ fetchSnapshots = do
|
||||
groupUp now' = groupBy (on (==) (.prettyDate))
|
||||
. map (uncrapify now')
|
||||
|
||||
getAllSnapshotsR :: Handler Html
|
||||
getAllSnapshotsR :: Handler TypedContent
|
||||
getAllSnapshotsR = track "Handler.Snapshots.getAllSnapshotsR" $ do
|
||||
(groups, Paging _ currentPage isFirstPage isLastPage) <- fetchSnapshots
|
||||
defaultLayout $ do
|
||||
setTitle "Stackage Server"
|
||||
let snapshotsNav = $(widgetFile "snapshots-nav")
|
||||
$(widgetFile "all-snapshots")
|
||||
(groups, paging) <- fetchSnapshots
|
||||
selectRep $ do
|
||||
let Paging _ currentPage isFirstPage isLastPage = paging
|
||||
provideRep $ defaultLayout $ do
|
||||
setTitle "Stackage Server"
|
||||
let snapshotsNav = $(widgetFile "snapshots-nav")
|
||||
$(widgetFile "all-snapshots")
|
||||
provideRep $ pure $ object
|
||||
[ "snapshots" .= groups
|
||||
, "totalCount" .= paging.totalCount
|
||||
]
|
||||
|
||||
getApiV1SnapshotsR :: Handler Value
|
||||
getApiV1SnapshotsR = track "Handler.API.getApiV1SnapshotsR" $ do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user