Skip to content
This repository was archived by the owner on Sep 12, 2022. It is now read-only.

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshitaka Okuda committed Mar 15, 2016
1 parent a8f6974 commit 64df5aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/adapter/GroupController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class GroupController @Inject()(useCase: PickLeaderUseCase, presenter: PickedLea

def pickLeader = Action.async { implicit request =>
form.bindFromRequest.fold(_ => Future.successful(BadRequest("not found query parameter: `groupId`")), (groupId: GroupId) =>
presenter.present(useCase.execute(groupId))
presenter.response(useCase.execute(groupId))
)
}

Expand Down
2 changes: 1 addition & 1 deletion app/adapter/PickedLeaderPresenter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class PickedLeaderPresenter extends Presenter[PickedLeaderCallback] {

implicit val writer = Json.writes[UserId]

override def present(call: UseCaseExecutor)(implicit ec: ExecutionContext): Future[Rendered] = {
override def response(call: UseCaseExecutor)(implicit ec: ExecutionContext): Future[Rendered] = {
val callback = new CallbackImpl
call(callback)
callback.promise.future.map { userId =>
Expand Down
2 changes: 1 addition & 1 deletion app/adapter/Presenter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ trait Presenter[C <: Callback[_]] extends Results {

type Rendered = Result

def present(call: UseCaseExecutor)(implicit ec: ExecutionContext): Future[Rendered]
def response(call: UseCaseExecutor)(implicit ec: ExecutionContext): Future[Rendered]
}

0 comments on commit 64df5aa

Please sign in to comment.