projects
/
website.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f63402
)
Moved api proxy out to ApiTypes.
author
sabadev
<saba@sabadev.xyz>
Sun, 21 Mar 2021 16:14:32 +0000
(12:14 -0400)
committer
sabadev
<dev@sabadev.xyz>
Tue, 13 Apr 2021 01:16:32 +0000
(21:16 -0400)
src/ApiTypes.hs
patch
|
blob
|
history
src/Server.hs
patch
|
blob
|
history
diff --git
a/src/ApiTypes.hs
b/src/ApiTypes.hs
index
e0a68c6
..
0d1ad9a
100644
(file)
--- 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
(file)
--- 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