2 Commits
Author SHA1 Message Date
mcndave ca88b94bbe - Removed saveError method 2026-10-27 18:28:32 +00:00
mcndave 9571c6a462 - WIP on package manager addition 2026-07-16 14:15:22 -04:00
2 changed files with 11 additions and 6 deletions

No files matched your search

+8 -3
View File
@@ -14,12 +14,17 @@
"php-di/php-di": "dev-master", "php-di/php-di": "dev-master",
"ext-json": "*", "ext-json": "*",
"ext-pdo": "*", "ext-pdo": "*",
"mcnd/lean": "1.4.2" "mcnd/lean": "^1.4.2",
"assets-package/ace": "^1.0.0"
}, },
"repositories": [ "repositories": [
{ {
"type": "vcs", "type": "composer",
"url": "https://git.mcnd.ca/mcndave/lean.git" "url": "https://git.mcnd.ca/api/packages/mcndave/composer"
},
{
"type": "composer",
"url": "https://git.mcnd.ca/api/packages/assets-package/composer"
} }
], ],
"autoload": { "autoload": {
+3 -3
View File
@@ -27,7 +27,7 @@ class ApiRenderer implements MiddlewareInterface {
} }
catch(\Throwable $ex) { catch(\Throwable $ex) {
if (static::awaitingJson($request)) { if (static::awaitingJson($request)) {
$this->saveError($request, $ex); # $this->saveError($request, $ex);
return HttpFactory::createJsonResponse([ return HttpFactory::createJsonResponse([
'status' => 'failed', 'status' => 'failed',
@@ -61,7 +61,7 @@ class ApiRenderer implements MiddlewareInterface {
return $response; 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)) { if ($debugFormFactory = $this->container->get(DebugFormFactoryInterface::class)) {
$request = $request->withMethod('PUT')->withParsedBody([]); $request = $request->withMethod('PUT')->withParsedBody([]);
@@ -82,7 +82,7 @@ class ApiRenderer implements MiddlewareInterface {
} }
return $entity; return $entity;
} }*/
public static function awaitingJson(ServerRequestInterface $request) : bool public static function awaitingJson(ServerRequestInterface $request) : bool
{ {