Skip to content

Instantly share code, notes, and snippets.

Created July 13, 2017 06:33
Show Gist options
  • Save anonymous/6f947e2db5d078749231ea9387be386b to your computer and use it in GitHub Desktop.
Save anonymous/6f947e2db5d078749231ea9387be386b to your computer and use it in GitHub Desktop.
the description for this gist
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