update CUSTOM SEGMENTS price api

This commit is contained in:
edmondlang
2022-08-06 01:46:06 +08:00
parent f7a2861072
commit cd59debee4
8 changed files with 158 additions and 11 deletions
@@ -70,7 +70,8 @@ class UpdateSegmentLogic extends AbstractControllerLogic
$segment_query = $this->fetchesSegment->execute(['id' => $request->route('id')]);
$segment_object = new SegmentObject(
$request->input('name', $segment_query->name)
$request->input('name'),
$segment_query->company_module_id
);
$this->canUpdateSegment->passes($segment_object);
$segment_query = $this->updatesSegment->execute($segment_query, $segment_object);