def index = Action.async { implicit request => ChanneledPresenter(context) flatMap { presenter => // alternatives for resource fetching, which may or may not be available val getAccountFavorites = ??? val createAccountFavorites = ??? val getSessionFavorites = ??? val createSessionFavorites = ??? Seq(getAccountFavorites, createAccountFavorites, getSessionFavorites, createSessionFavorites).flatten.headOption match { case Some(futureTryUserFavorites) => for { Success(userFavorites) <- futureTryUserFavorites } yield { Ok(views.html.favorites.index(FavoritesPresenter(releases, photos, videos))) } case None => Ok(views.html.favorites.index(FavoritesPresenter(Seq.empty, Seq.empty, Seq.empty))) } } }