DDB-1753 #5

Merged
dcherednik merged 21 commits from DDB-1753 into master 2025-03-21 13:37:34 +03:00
2 changed files with 3 additions and 8 deletions
Showing only changes of commit a4a12752b8 - Show all commits

View File

@ -25,13 +25,8 @@ class DigitalSignatureController extends AbstractController
{
$token = $request->server->get('HTTP_AUTHORIZATION');
$response = $this->digitalSignatureService->getSignature($digitalSignatureRequest, $token);
return $this->createJsonResponse(
[
'hash' => $response->hash,
'content' => base64_encode($response->content),
]
return $this->createJsonResponseFromObject(
$this->digitalSignatureService->getSignature($digitalSignatureRequest, $token)
);
}
}

View File

@ -46,7 +46,7 @@ class DigitalSignatureService
return new DigitalSignatureResponse(
hash: $response,
content: file_get_contents(sprintf('%s.pdf', $this->document->tempFileName))
content: base64_encode(file_get_contents(sprintf('%s.pdf', $this->document->tempFileName)))
);
} catch (Exception $e) {
throw new RuntimeException($e->getMessage());