Advertisement
Guest User

Untitled

a guest
Mar 5th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. val extFriendsRoute: Route =
  2. path("integration" / AuthTypeSegment / "friends" / "invite") { case authType =>
  3. if (authType == AuthType.Selfish)
  4. post {
  5. tracedHandleWith(NodeConfig.moduleName)(inviteFriendsByEmails)
  6. }
  7. else
  8. (get & parameter('token.as[String])) { case token =>
  9. tracedHandleWith(authType :: token :: HNil)(findFriendsToInviteByOAuth)
  10. }
  11. } ~
  12. path("integration" / AuthTypeSegment / "friends") { case authType =>
  13. if (authType == AuthType.Selfish)
  14. post {
  15. tracedHandleWith(NodeConfig.moduleName)(findFriendsByEmails)
  16. }
  17. else
  18. (get & parameter('token.as[String])) { case token =>
  19. tracedHandleWith(authType :: token :: HNil)(findFriendsByOAuth)
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement