feat: implement entity patch
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -797,10 +797,10 @@ class DefaultController extends ControllerAbstract {
|
||||
if (!is_array($data['targets'])) {
|
||||
throw new InvalidArgumentException(self::ERR_INVALID_TARGETS);
|
||||
}
|
||||
if (!isset($data['data'])) {
|
||||
if (!isset($data['properties'])) {
|
||||
throw new InvalidArgumentException(self::ERR_MISSING_DATA);
|
||||
}
|
||||
if (!is_array($data['data'])) {
|
||||
if (!is_array($data['properties'])) {
|
||||
throw new InvalidArgumentException(self::ERR_INVALID_DATA);
|
||||
}
|
||||
|
||||
@@ -811,7 +811,7 @@ class DefaultController extends ControllerAbstract {
|
||||
}
|
||||
}
|
||||
|
||||
return $this->mailManager->entityPatch($tenantId, $userId, $targets, $data['data']);
|
||||
return $this->mailManager->entityPatch($tenantId, $userId, $data['properties'], ...$targets->all());
|
||||
}
|
||||
|
||||
private function entityMove(string $tenantId, string $userId, array $data): mixed {
|
||||
|
||||
Reference in New Issue
Block a user