fix(ApiHandler.php): handle PATCH requests in fetchFromPostgREST

This commit is contained in:
Cory Dransfeldt 2025-03-28 17:30:17 -07:00
parent d5c31a87d3
commit c40dcbac2b
No known key found for this signature in database
4 changed files with 7 additions and 5 deletions

View file

@ -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);