mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-09-02 03:14:12 +00:00
remove insert segment if segment does not exist
This commit is contained in:
@@ -96,16 +96,7 @@ class UpdateConstantLogic extends AbstractControllerLogic
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$segment = $this->fetchesSegment->execute(['id' => $request->route('id')]);
|
||||
|
||||
} catch (ResourceNotFoundException $exception){
|
||||
|
||||
$object = new SegmentObject('Standard Segment', 1);
|
||||
|
||||
$segment = $this->createsSegment->execute($object);
|
||||
}
|
||||
$segment = $this->fetchesSegment->execute(['id' => $request->route('id')]);
|
||||
|
||||
try {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user