DDB-1753: fix response
build (signer) TeamCity build finished
Details
build (signer) TeamCity build finished
Details
This commit is contained in:
parent
6533368534
commit
a4a12752b8
|
|
@ -25,13 +25,8 @@ class DigitalSignatureController extends AbstractController
|
||||||
{
|
{
|
||||||
$token = $request->server->get('HTTP_AUTHORIZATION');
|
$token = $request->server->get('HTTP_AUTHORIZATION');
|
||||||
|
|
||||||
$response = $this->digitalSignatureService->getSignature($digitalSignatureRequest, $token);
|
return $this->createJsonResponseFromObject(
|
||||||
|
$this->digitalSignatureService->getSignature($digitalSignatureRequest, $token)
|
||||||
return $this->createJsonResponse(
|
|
||||||
[
|
|
||||||
'hash' => $response->hash,
|
|
||||||
'content' => base64_encode($response->content),
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -46,7 +46,7 @@ class DigitalSignatureService
|
||||||
|
|
||||||
return new DigitalSignatureResponse(
|
return new DigitalSignatureResponse(
|
||||||
hash: $response,
|
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) {
|
} catch (Exception $e) {
|
||||||
throw new RuntimeException($e->getMessage());
|
throw new RuntimeException($e->getMessage());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue