diff options
author | William Carroll <wpcarro@gmail.com> | 2020-08-14T11·41+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-08-20T10·26+0100 |
commit | ace08853e03de13dc14077477bd8ccb51e2730f2 (patch) | |
tree | 88c40ebb204af34eee3d8e14b4433104f5259231 /zoo | |
parent | 309c5452e1cb2b2cfffd2216017cf8c106cbbb30 (diff) |
Add GET /mimi to zoo
Proving to my girlfriend that the zoo works.
Diffstat (limited to 'zoo')
-rw-r--r-- | zoo/Main.hs | 6 |
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 |