mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-06-11 08:42:32 +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))
|
groupUp now' = groupBy (on (==) (.prettyDate))
|
||||||
. map (uncrapify now')
|
. map (uncrapify now')
|
||||||
|
|
||||||
getAllSnapshotsR :: Handler Html
|
getAllSnapshotsR :: Handler TypedContent
|
||||||
getAllSnapshotsR = track "Handler.Snapshots.getAllSnapshotsR" $ do
|
getAllSnapshotsR = track "Handler.Snapshots.getAllSnapshotsR" $ do
|
||||||
(groups, Paging _ currentPage isFirstPage isLastPage) <- fetchSnapshots
|
(groups, paging) <- fetchSnapshots
|
||||||
defaultLayout $ do
|
selectRep $ do
|
||||||
setTitle "Stackage Server"
|
let Paging _ currentPage isFirstPage isLastPage = paging
|
||||||
let snapshotsNav = $(widgetFile "snapshots-nav")
|
provideRep $ defaultLayout $ do
|
||||||
$(widgetFile "all-snapshots")
|
setTitle "Stackage Server"
|
||||||
|
let snapshotsNav = $(widgetFile "snapshots-nav")
|
||||||
|
$(widgetFile "all-snapshots")
|
||||||
|
provideRep $ pure $ object
|
||||||
|
[ "snapshots" .= groups
|
||||||
|
, "totalCount" .= paging.totalCount
|
||||||
|
]
|
||||||
|
|
||||||
getApiV1SnapshotsR :: Handler Value
|
getApiV1SnapshotsR :: Handler Value
|
||||||
getApiV1SnapshotsR = track "Handler.API.getApiV1SnapshotsR" $ do
|
getApiV1SnapshotsR = track "Handler.API.getApiV1SnapshotsR" $ do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user