mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-26 02:11:53 +00:00
fix new route setup
This commit is contained in:
@@ -186,7 +186,7 @@ import Handler.Admin (
|
|||||||
postPkgUploadR,
|
postPkgUploadR,
|
||||||
)
|
)
|
||||||
import Handler.Eos (getEosR, getEosVersionR)
|
import Handler.Eos (getEosR, getEosVersionR)
|
||||||
import Handler.Root(getRootR)
|
import Handler.Root(getRootR, getMarketplaceR)
|
||||||
import Handler.Package
|
import Handler.Package
|
||||||
import Lib.Ssl (
|
import Lib.Ssl (
|
||||||
doesSslNeedRenew,
|
doesSslNeedRenew,
|
||||||
|
|||||||
@@ -5,14 +5,15 @@ import Foundation
|
|||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import Settings (AppSettings(registryHostname, marketplaceName))
|
import Settings (AppSettings(registryHostname, marketplaceName))
|
||||||
import Network.Wai (Request(pathInfo))
|
import Network.Wai (Request(pathInfo))
|
||||||
|
import Lib.Types.Core (PkgId)
|
||||||
|
|
||||||
getRootR :: HandlerFor RegistryCtx ()
|
getRootR :: HandlerFor RegistryCtx ()
|
||||||
getRootR = do
|
getRootR = do
|
||||||
(url, name) <- getsYesod $ (registryHostname &&& marketplaceName) . appSettings
|
(url, name) <- getsYesod $ (registryHostname &&& marketplaceName) . appSettings
|
||||||
redirect $ T.pack "https://marketplace.start9.com?api=" <> url <> T.pack "&name=" <> name
|
redirect $ T.pack "https://marketplace.start9.com?api=" <> url <> T.pack "&name=" <> name
|
||||||
|
|
||||||
getMarketplaceR :: HandlerFor RegistryCtx ()
|
getMarketplaceR :: PkgId -> HandlerFor RegistryCtx ()
|
||||||
getMarketplaceR = do
|
getMarketplaceR _ = do
|
||||||
(url, name) <- getsYesod $ (registryHostname &&& marketplaceName) . appSettings
|
(url, name) <- getsYesod $ (registryHostname &&& marketplaceName) . appSettings
|
||||||
req <- waiRequest
|
req <- waiRequest
|
||||||
pathSegments <- pure $ pathInfo req
|
pathSegments <- pure $ pathInfo req
|
||||||
|
|||||||
Reference in New Issue
Block a user