Moved api proxy out to ApiTypes.
authorsabadev <saba@sabadev.xyz>
Sun, 21 Mar 2021 16:14:32 +0000 (12:14 -0400)
committersabadev <dev@sabadev.xyz>
Tue, 13 Apr 2021 01:16:32 +0000 (21:16 -0400)
src/ApiTypes.hs
src/Server.hs

index e0a68c6..0d1ad9a 100644 (file)
@@ -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
index e2897ee..60081ba 100644 (file)
@@ -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