2 Commits
2 changed files with 3 additions and 3 deletions

No files matched your search

+2 -2
View File
@@ -30,7 +30,7 @@ return [
return HttpFactory::createJsonResponse($errorData + [
'api.error' => "Authorization failed",
'api.datetime' => (new \DateTime)->format(\DateTime::ATOM),
]);
], 401);
};
},
@@ -40,7 +40,7 @@ return [
'title' => "Authentication failed",
'subtitle' => "",
'message' => $message,
]));
]), 401);
};
},
];
+1 -1
View File
@@ -39,7 +39,7 @@ class HttpFactory
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);
}