Created
June 7, 2019 19:20
-
-
Save adamw/9de0d397be15c2830844de5b0d2e6d70 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val service: HttpRoutes[Task] = petEndpoint.toZioRoutes { petId => | |
if (petId == 35) { | |
UIO(Pet("Tapirus terrestris", "https://en.wikipedia.org/wiki/Tapir")) | |
} else { | |
IO.fail("Unknown pet id") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment