From 5d885bc286b7028fd89857a6c21fd42a90a59856 Mon Sep 17 00:00:00 2001 From: sabadev Date: Sun, 21 Mar 2021 12:14:32 -0400 Subject: [PATCH] Moved api proxy out to ApiTypes. --- src/ApiTypes.hs | 3 +++ src/Server.hs | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) 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 -- 2.20.1