fix: catchall event and cmd handler for LineItem
This commit is contained in:
parent
3a19d7099d
commit
b1fabadaad
1 changed files with 3 additions and 2 deletions
|
@ -98,7 +98,8 @@ impl Aggregate for LineItem {
|
||||||
OrderingCommand::DeleteLineItem(cmd) => {
|
OrderingCommand::DeleteLineItem(cmd) => {
|
||||||
let res = services.delete_line_item().delete_line_item(cmd).await?;
|
let res = services.delete_line_item().delete_line_item(cmd).await?;
|
||||||
Ok(vec![OrderingEvent::LineItemDeleted(res)])
|
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::LineItemAdded(e) => *self = e.line_item().clone(),
|
||||||
OrderingEvent::LineItemUpdated(e) => *self = e.new_line_item().clone(),
|
OrderingEvent::LineItemUpdated(e) => *self = e.new_line_item().clone(),
|
||||||
OrderingEvent::LineItemDeleted(e) => *self = e.line_item().clone(),
|
OrderingEvent::LineItemDeleted(e) => *self = e.line_item().clone(),
|
||||||
// _ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue