Remove bundle links in preparation of much larger v2 bundles

This commit is contained in:
Michael Snoyman 2015-03-16 13:34:10 +02:00
parent 93f91708ca
commit 6cf5be6ff1
4 changed files with 1 additions and 27 deletions

View File

@ -7,7 +7,7 @@ module Handler.Alias
import Import
import Data.Slug (Slug)
import Handler.StackageHome (getStackageHomeR, getStackageMetadataR, getStackageCabalConfigR, getSnapshotPackagesR, getDocsR)
import Handler.StackageIndex (getStackageIndexR, getStackageBundleR)
import Handler.StackageIndex (getStackageIndexR)
import Handler.StackageSdist (getStackageSdistR)
import Handler.Hoogle (getHoogleR)
@ -74,7 +74,6 @@ goSid sid pieces = do
StackageMetadataR -> getStackageMetadataR slug >>= sendResponse
StackageCabalConfigR -> getStackageCabalConfigR slug >>= sendResponse
StackageIndexR -> getStackageIndexR slug >>= sendResponse
StackageBundleR -> getStackageBundleR slug >>= sendResponse
StackageSdistR pnv -> getStackageSdistR slug pnv >>= sendResponse
SnapshotPackagesR -> getSnapshotPackagesR slug >>= sendResponse
DocsR -> getDocsR slug >>= sendResponse

View File

@ -16,19 +16,3 @@ getStackageIndexR slug = do
addHeader "content-disposition" "attachment; filename=\"00-index.tar.gz\""
neverExpires
respondSource "application/x-gzip" $ mapOutput (Chunk . toBuilder) src
getStackageBundleR :: SnapSlug -> Handler TypedContent
getStackageBundleR slug = do
Entity _ stackage <- runDB $ getBy404 $ UniqueSnapshot slug
let ident = stackageIdent stackage
slug' = stackageSlug stackage
msrc <- storeRead $ SnapshotBundle ident
case msrc of
Nothing -> notFound
Just src -> do
addHeader "content-disposition" $ mconcat
[ "attachment; filename=\"bundle-"
, toPathPiece slug'
, ".tar.gz\""
]
respondSource "application/x-gzip" $ mapOutput (Chunk . toBuilder) src

View File

@ -21,7 +21,6 @@
/metadata StackageMetadataR GET
/cabal.config StackageCabalConfigR GET
/00-index.tar.gz StackageIndexR GET
/bundle StackageBundleR GET
/package/#PackageNameVersion StackageSdistR GET
/packages SnapshotPackagesR GET
/docs DocsR GET

View File

@ -74,11 +74,3 @@ $newline never
<a href=@{doc}>Docs
<td>
#{synopsis}
<div .container>
<p .bottom-links>
$if hasBundle
<span>
<a href=@{SnapshotR slug StackageBundleR} title="This is useful for making modifications to an existing snapshot">
\Bundle