fix: catchall event and cmd handler for LineItem
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful

This commit is contained in:
Aravinth Manivannan 2024-07-23 19:37:54 +05:30
parent 3a19d7099d
commit b1fabadaad
Signed by: realaravinth
GPG key ID: F8F50389936984FF

View file

@ -98,7 +98,8 @@ impl Aggregate for LineItem {
OrderingCommand::DeleteLineItem(cmd) => {
let res = services.delete_line_item().delete_line_item(cmd).await?;
Ok(vec![OrderingEvent::LineItemDeleted(res)])
} // _ => Ok(Vec::default()),
}
_ => Ok(Vec::default()),
}
}
@ -107,7 +108,7 @@ impl Aggregate for LineItem {
OrderingEvent::LineItemAdded(e) => *self = e.line_item().clone(),
OrderingEvent::LineItemUpdated(e) => *self = e.new_line_item().clone(),
OrderingEvent::LineItemDeleted(e) => *self = e.line_item().clone(),
// _ => (),
_ => (),
}
}
}