Use parsed body if present
This commit is contained in:
parent
16c56cccee
commit
2f0a524bde
|
|
@ -92,6 +92,6 @@ class Context
|
||||||
*/
|
*/
|
||||||
public function getBody(): ?array
|
public function getBody(): ?array
|
||||||
{
|
{
|
||||||
return json_decode($this->request->getBody()->getContents(), true);
|
return $this->request->getParsedBody() ?: json_decode($this->request->getBody()->getContents(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ final class Atomic extends Extension
|
||||||
throw new MethodNotAllowedException();
|
throw new MethodNotAllowedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
$body = $request->getParsedBody();
|
$body = $context->getBody();
|
||||||
$operations = $body['atomic:operations'] ?? null;
|
$operations = $body['atomic:operations'] ?? null;
|
||||||
|
|
||||||
if (! is_array($operations)) {
|
if (! is_array($operations)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue