feat: implement entity patch
Some checks failed
Build Test / test (pull_request) Successful in 35s
JS Unit Tests / test (pull_request) Failing after 34s
PHP Unit Tests / test (pull_request) Successful in 1m9s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-05-20 21:37:14 -04:00
parent aff17840ed
commit 453d720046
5 changed files with 117 additions and 43 deletions

View File

@@ -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 {