From b1fabadaad56da4a9dfe78924c9b5a6d9614e148 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Tue, 23 Jul 2024 19:37:54 +0530 Subject: [PATCH] fix: catchall event and cmd handler for LineItem --- src/ordering/domain/line_item_aggregate.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ordering/domain/line_item_aggregate.rs b/src/ordering/domain/line_item_aggregate.rs index 68aeab6..0483d33 100644 --- a/src/ordering/domain/line_item_aggregate.rs +++ b/src/ordering/domain/line_item_aggregate.rs @@ -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(), - // _ => (), + _ => (), } } }