Compare commits

..

2 Commits

Author SHA1 Message Date
Dave Mc Nicoll
a9db9cd846 Merge branch 'master' of https://git.mcnd.ca/mcndave/lean 2023-11-27 13:03:19 -05:00
Dave Mc Nicoll
2a18e0cb9a - Repaired a bad authentiation config 2023-11-27 13:02:20 -05:00
3 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ return [
return HttpFactory::createJsonResponse($errorData + [ return HttpFactory::createJsonResponse($errorData + [
'api.error' => "Authorization failed", 'api.error' => "Authorization failed",
'api.datetime' => (new \DateTime)->format(\DateTime::ATOM), 'api.datetime' => (new \DateTime)->format(\DateTime::ATOM),
]); ], 401);
}; };
}, },
@ -40,7 +40,7 @@ return [
'title' => "Authentication failed", 'title' => "Authentication failed",
'subtitle' => "", 'subtitle' => "",
'message' => $message, 'message' => $message,
])); ]), 401);
}; };
}, },
]; ];

View File

@ -39,7 +39,7 @@ class HttpFactory
return new EmptyResponse($code, $headers); return new EmptyResponse($code, $headers);
} }
public static function createPdfResponse(\Stringable $binary, int $code = 200, array $headers = []) : ResponseInterface public static function createPdfResponse(\Stringable|string $binary, int $code = 200, array $headers = []) : ResponseInterface
{ {
return new PdfResponse((string) $binary, $code, $headers); return new PdfResponse((string) $binary, $code, $headers);
} }