feat: add order service #66

Merged
realaravinth merged 7 commits from add-order-service into master 2024-07-23 19:52:06 +05:30
Showing only changes of commit b1fabadaad - Show all commits

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(),
// _ => (),
_ => (),
}
}
}