Refactor code that checks for list deletion with form
Move segment deletion to new function doTrash to avoid calling methods twice on individual segment deletion. Refactor acceptance test. [MAILPOET-3661]
This commit is contained in:
@ -209,7 +209,7 @@ class Segments extends APIEndpoint {
|
||||
$this->subscribersRepository->bulkTrash($subscriberIds);
|
||||
}
|
||||
|
||||
$this->segmentsRepository->bulkTrash([$segment->getId()], $segment->getType());
|
||||
$this->segmentsRepository->doTrash([$segment->getId()], $segment->getType());
|
||||
$this->segmentsRepository->refresh($segment);
|
||||
return $this->successResponse(
|
||||
$this->segmentsResponseBuilder->build($segment),
|
||||
|
Reference in New Issue
Block a user