Add GET /mimi to zoo
Proving to my girlfriend that the zoo works.
This commit is contained in:
parent
309c5452e1
commit
ace08853e0
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue