Created
July 13, 2017 06:33
-
-
Save anonymous/6f947e2db5d078749231ea9387be386b to your computer and use it in GitHub Desktop.
the description for this gist
This file contains 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
class LogInService(clientId: String)( | |
//Freestyle will provide it | |
implicit uberHandler: FSHandler[Deps.Op, Task] | |
) { | |
... | |
val app = new Programs[Deps.Op]() | |
... | |
app.registerUser(credentials).interpret[Task].flatMap { | |
case UserRegistered(id) => | |
Ok(s"registered: $id") | |
case AlreadyRegistered => | |
Conflict(s"email is already used") | |
case InternalFailure(err) => | |
InternalServerError(s"$err") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment