This commit is contained in:
2025-04-25 22:30:43 -04:00
parent d5167074a0
commit b7f44666d5
6 changed files with 67 additions and 66 deletions

View File

@@ -13,11 +13,10 @@ use Nyholm\Psr7\Response;
*/
class JsonResponseFactory
{
/**
* Create a JSON response with the given data and status code.
*
* @param mixed $data The data to include in the response.
* @param array $data The data to include in the response.
* @param int $statusCode The HTTP status code for the response.
* @return Response The JSON response.
* @throws \JsonException
@@ -32,4 +31,4 @@ class JsonResponseFactory
body: json_encode($data, JSON_THROW_ON_ERROR)
);
}
}
}

View File

@@ -70,4 +70,3 @@ class CorsMiddleware implements MiddlewareInterface
return $response->withHeader('Access-Control-Max-Age', $maxAge);
}
}