refactor create freight order to return dto
This commit is contained in:
parent
21216ab52f
commit
f322a0f80e
3 changed files with 19 additions and 5 deletions
|
|
@ -19,14 +19,14 @@ class CreateFreightOrder
|
|||
|
||||
public function execute(
|
||||
CreateFreightOrderRequestDTO $dto,
|
||||
): FreightOrder {
|
||||
): CreateFreightOrderResponseDTO {
|
||||
$savedFreightOrder = $this->saveFreightOrder($dto);
|
||||
$this->handleCarrierActions(
|
||||
$dto->carrierIds,
|
||||
$savedFreightOrder,
|
||||
);
|
||||
|
||||
return $savedFreightOrder;
|
||||
return new CreateFreightOrderResponseDTO($savedFreightOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue