vadipp

Play Action.async

Jul 16th, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.23 KB | None | 0 0
  1. // login and getAccounts return Future
  2. def something = Action.async { implicit rs =>
  3.   for {
  4.     session <- login(credentials.login, credentials.password)
  5.     accounts <- getAccounts(session)
  6.   } yield Ok(accounts.toString())
  7. }
Advertisement
Add Comment
Please, Sign In to add comment