From cea9bdedaf1fd8dbf737cef839e3710e6c13f901 Mon Sep 17 00:00:00 2001 From: cherednik Date: Fri, 10 Jan 2025 12:29:02 +0400 Subject: [PATCH] =?UTF-8?q?DD-3602:=20[BACK].=20[=D0=94=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=BD=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=B2=D0=BE?= =?UTF-8?q?=D0=B4=D0=B8=D1=82=D0=B5=D0=BB=D1=8E=20=D1=81=20=D0=9A=D0=AD?= =?UTF-8?q?=D0=9F]=20-=20[=D1=80=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D1=82=D1=8C=20=D0=BE=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D1=83=20=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=B0?= =?UTF-8?q?=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20=D0=90=D0=9F=D0=98=20=D0=94?= =?UTF-8?q?=D0=B8=D0=B0=D0=B4=D0=BE=D0=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.env | 11 ----------- .../Controller/DigitalSignatureController.php | 11 ++++------- 2 files changed, 4 insertions(+), 18 deletions(-) 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