From ace08853e03de13dc14077477bd8ccb51e2730f2 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Fri, 14 Aug 2020 12:41:08 +0100 Subject: Add GET /mimi to zoo Proving to my girlfriend that the zoo works. --- zoo/Main.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'zoo/Main.hs') 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 -- cgit 1.4.1