Skip to content

Instantly share code, notes, and snippets.

Created July 13, 2017 06:33
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
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) =>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment