Update NewDesign.md

This commit is contained in:
Rashad Gover 2023-04-18 15:03:54 -05:00 committed by GitHub
parent 3bf38dd517
commit 3e9ebbb93a

View File

@ -647,19 +647,18 @@ Plan $$
do
Path.static "index"
magicNumber <- Path.param @Int
Path.pure magicNumber
pure magicNumber
do
x <- Query.param @Int "x"
y <- Query.option 10 $ Query.param @Int "y"
Query.pure (x, y)
pure (x, y)
do pure ()
do pure ()
do
itsOk <- Responder.json @Int HTTP.status200
do
addSecretNumber <- ResponderHeaders.has @Int "X-SECRET"
ResponderHeaders.pure addSecretNumber
Responder.pure itsOk
itsOk <- Responder.json @Int HTTP.status200 do
addSecretNumber <- ResponderHeaders.has @Int "X-SECRET"
ResponderHeaders.pure addSecretNumber
pure itsOk
\magicNumber (x, y) () () responder -> do
let newNumber = magicNumber + x * y
print newNumber