DDB-1753 #5
|
|
@ -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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in New Issue