From: sabadev Date: Sun, 21 Mar 2021 16:14:32 +0000 (-0400) Subject: Moved api proxy out to ApiTypes. X-Git-Url: http://sabadev.xyz:4321/?a=commitdiff_plain;h=5d885bc286b7028fd89857a6c21fd42a90a59856;p=website.git Moved api proxy out to ApiTypes. --- diff --git a/src/ApiTypes.hs b/src/ApiTypes.hs index e0a68c6..0d1ad9a 100644 --- a/src/ApiTypes.hs +++ b/src/ApiTypes.hs @@ -15,3 +15,6 @@ type Themes = "style" :> (DarkTheme :<|> LightTheme) type DarkTheme = "dark" :> QueryParam "red" Integer :> QueryParam "green" Integer :> QueryParam "blue" Integer :> Get '[CSS] C.Css type LightTheme = "light" :> QueryParam "red" Integer :> QueryParam "green" Integer :> QueryParam "blue" Integer :> Get '[CSS] C.Css type ThemeParam = QueryParam "theme" Theme + +apiProxy :: Proxy Api +apiProxy = Proxy diff --git a/src/Server.hs b/src/Server.hs index e2897ee..60081ba 100644 --- a/src/Server.hs +++ b/src/Server.hs @@ -16,9 +16,6 @@ import qualified Data.Text.IO as T app :: Application app = serve apiProxy api -apiProxy :: Proxy Api -apiProxy = Proxy - api :: Server Api api = page :<|> themes