about summary refs log tree commit diff
path: root/zoo/Main.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-08-14T11·41+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-08-20T10·26+0100
commitace08853e03de13dc14077477bd8ccb51e2730f2 (patch)
tree88c40ebb204af34eee3d8e14b4433104f5259231 /zoo/Main.hs
parent309c5452e1cb2b2cfffd2216017cf8c106cbbb30 (diff)
Add GET /mimi to zoo
Proving to my girlfriend that the zoo works.
Diffstat (limited to 'zoo/Main.hs')
-rw-r--r--zoo/Main.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/zoo/Main.hs b/zoo/Main.hs
index cb9f5fbf4e9d..8706a7daac7e 100644
--- a/zoo/Main.hs
+++ b/zoo/Main.hs
@@ -18,9 +18,11 @@ import qualified Network.Wai.Handler.Warp as Warp
 type Api = "run"
            :> QueryParam' '[Required] "offset" Text
            :> Get '[JSON] UTCTime
+      :<|> "mimi"
+           :> Get '[JSON] Text
 
 server :: Server Api
-server = compute
+server = compute :<|> helloMimi
   where
     compute :: Text -> Handler UTCTime
     compute x = do
@@ -29,6 +31,8 @@ server = compute
         Just req -> do
           res <- liftIO $ shiftTime req
           pure res
+    helloMimi :: Handler Text
+    helloMimi = pure "Hello, Mimi"
 
 data ShiftTimeRequest = ShiftTimeRequest
   { shiftSeconds :: Int