fix(ApiHandler.php): handle PATCH requests in fetchFromPostgREST
This commit is contained in:
parent
d5c31a87d3
commit
c40dcbac2b
4 changed files with 7 additions and 5 deletions
|
@ -50,7 +50,9 @@ abstract class ApiHandler
|
|||
],
|
||||
];
|
||||
|
||||
if ($method === "POST" && $body) $options["json"] = $body;
|
||||
if (in_array($method, ["POST", "PATCH"]) && $body) {
|
||||
$options["json"] = $body;
|
||||
}
|
||||
|
||||
$response = (new Client())->request($method, $url, $options);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue