diff --git a/backend/.env b/backend/.env index ca3f4c9..aa658b2 100644 --- a/backend/.env +++ b/backend/.env @@ -13,14 +13,3 @@ DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&ch DOT_DOT_URL='http://dot-dot.local' API_TOKEN='secret' - -###> KONTUR_DIADOC### -API_KONTUR_DIADOC_END_POINT_URL=https://diadoc-api.kontur.ru -API_KONTUR_DIADOC_API_TOKEN=API-3701ccdb-7bdf-4f29-bbe0-3a0278eee913 -API_KONTUR_DIADOC_LOGIN=LOGIN -API_KONTUR_DIADOC_PASSWORD=PASSWORD -###> KONTUR_DIADOC_POST_MESSAGE_DIRECTION### -API_KONTUR_DIADOC_PMD_BOX_ID=c1a0d340-a481-49b2-ba21-d51dea59df55 -API_KONTUR_DIADOC_PMD_FROM_DEPT_ID=00000000-0000-0000-0000-000000000000 -API_KONTUR_DIADOC_PMD_TO_DEPT_ID=da0f3b33-ef70-41e9-8e9e-fb431a891ef4 -###< KONTUR_DIADOC### \ No newline at end of file diff --git a/backend/src/SignDocument/Controller/DigitalSignatureController.php b/backend/src/SignDocument/Controller/DigitalSignatureController.php index a2f6bd8..5baf49f 100644 --- a/backend/src/SignDocument/Controller/DigitalSignatureController.php +++ b/backend/src/SignDocument/Controller/DigitalSignatureController.php @@ -7,6 +7,7 @@ namespace App\SignDocument\Controller; use App\Infrastructure\Traits\ApiHelperTrait; use App\SignDocument\Api\Request\DigitalSignatureRequest; use App\SignDocument\Services\DigitalSignatureService; +use PHPUnit\Event\RuntimeException; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -26,12 +27,8 @@ class DigitalSignatureController extends AbstractController { $token = $request->server->get('HTTP_AUTHORIZATION'); - try { - return $this->createJsonResponse([ - 'base64' => $this->digitalSignatureService->getSignature($digitalSignatureRequest, $token), - ]); - } catch (Exception $exception) { - return $this->createJsonResponse([], $exception->getMessage(), 400); - } + return $this->createJsonResponse([ + 'hash' => $this->digitalSignatureService->getSignature($digitalSignatureRequest, $token), + ]); } } \ No newline at end of file