2 Commits
3 changed files with 4 additions and 4 deletions

No files matched your search

+2 -2
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);
}; };
}, },
]; ];
+1 -1
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);
} }
+1 -1
View File
@@ -209,4 +209,4 @@ class Lean
return false; return false;
} }
} }