Last active
December 1, 2016 22:27
-
-
Save andyczerwonka/6846edf8670b8f5c2c975d37d3801bf0 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
class InvitationApi() extends Controller { | |
def invite() = Action(parse.json) { request => | |
val payload = request.body.as[UserId] | |
val baseUrl = ApplicationConfiguration.get(this).baseUrl | |
sendInvitation(payload.userId, baseUrl) match { | |
case Success(invitation) => Ok | |
case Failure(e) => BadRequest(e.getMessage) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment