From ace08853e03de13dc14077477bd8ccb51e2730f2 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Fri, 14 Aug 2020 12:41:08 +0100 Subject: [PATCH] Add GET /mimi to zoo Proving to my girlfriend that the zoo works. --- zoo/Main.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zoo/Main.hs b/zoo/Main.hs index cb9f5fbf4..8706a7daa 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