- Big WIP on forms component

This commit is contained in:
mcndave committed 2025-12-01 15:46:02 +00:00
1 parent c0b0681fee
commit 3d50cfaccb
14 files changed
+114 -20

No files matched your search

+2 -2
View File
@@ -26,7 +26,7 @@ class ApiRenderer implements MiddlewareInterface {
catch(\Throwable $ex) {
# $errorId = $this->saveError($request, $ex)->id;
if ($this->awaitingJson($request)) {
if (static::awaitingJson($request)) {
return HttpFactory::createJsonResponse([
'status' => 'failed',
'ts' => time(),
@@ -80,7 +80,7 @@ class ApiRenderer implements MiddlewareInterface {
return $entity;
}
protected function awaitingJson(ServerRequestInterface $request) : bool
public static function awaitingJson(ServerRequestInterface $request) : bool
{
return str_contains(strtolower($request->getHeaderLine('content-type')), 'json');
}