Skip to content

Commit

Permalink
its: Fixed handle_block_issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Mar 10, 2022
1 parent 69c4df1 commit d9ba203
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion its/crates/use_case/src/use_case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,13 @@ pub trait IssueManagementContextUseCase: HasIssueRepository + HasIssueBlockLinkR
.save(&issue_block_link)
.await?;

todo!()
Ok(match issue_block_link.events().first() {
Some(event) => match event {
IssueBlockLinkAggregateEvent::Blocked(event) => event.clone(),
IssueBlockLinkAggregateEvent::Unblocked(_) => unreachable!(),
},
None => unreachable!(),
})
}

async fn handle_create_issue(
Expand Down

0 comments on commit d9ba203

Please sign in to comment.