Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca88b94bbe | ||
|
|
9571c6a462 | ||
|
|
c657ba4f60 | ||
|
|
b8daa60e66 |
No files matched your search
+9
-3
@@ -13,12 +13,18 @@
|
||||
"php": "^8.4",
|
||||
"php-di/php-di": "dev-master",
|
||||
"ext-json": "*",
|
||||
"mcnd/lean": "dev-master"
|
||||
"ext-pdo": "*",
|
||||
"mcnd/lean": "^1.4.2",
|
||||
"assets-package/ace": "^1.0.0"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://git.mcnd.ca/mcndave/lean.git"
|
||||
"type": "composer",
|
||||
"url": "https://git.mcnd.ca/api/packages/mcndave/composer"
|
||||
},
|
||||
{
|
||||
"type": "composer",
|
||||
"url": "https://git.mcnd.ca/api/packages/assets-package/composer"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
|
||||
@@ -18,7 +18,7 @@ class ContextField
|
||||
public ?int $minValue = null,
|
||||
public ?int $maxValue = null,
|
||||
public ?string $regexFormat = null,
|
||||
public ?string $example = null,
|
||||
public mixed $example = null,
|
||||
public mixed $default = null,
|
||||
public bool $hidden = false,
|
||||
) {}
|
||||
|
||||
@@ -27,7 +27,7 @@ class ApiRenderer implements MiddlewareInterface {
|
||||
}
|
||||
catch(\Throwable $ex) {
|
||||
if (static::awaitingJson($request)) {
|
||||
$this->saveError($request, $ex);
|
||||
# $this->saveError($request, $ex);
|
||||
|
||||
return HttpFactory::createJsonResponse([
|
||||
'status' => 'failed',
|
||||
@@ -61,7 +61,7 @@ class ApiRenderer implements MiddlewareInterface {
|
||||
return $response;
|
||||
}
|
||||
|
||||
protected function saveError(ServerRequestInterface $request, \Throwable $exception) : Entity\Error
|
||||
/*protected function saveError(ServerRequestInterface $request, \Throwable $exception) : Entity\Error
|
||||
{
|
||||
if ($debugFormFactory = $this->container->get(DebugFormFactoryInterface::class)) {
|
||||
$request = $request->withMethod('PUT')->withParsedBody([]);
|
||||
@@ -82,7 +82,7 @@ class ApiRenderer implements MiddlewareInterface {
|
||||
}
|
||||
|
||||
return $entity;
|
||||
}
|
||||
}*/
|
||||
|
||||
public static function awaitingJson(ServerRequestInterface $request) : bool
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user