diff --git a/application/public/index.php b/application/public/index.php index bb96f59..68c269f 100644 --- a/application/public/index.php +++ b/application/public/index.php @@ -78,16 +78,7 @@ function callAtlassian( $app->options('/test/auth', function (Request $request, Response $response, $args) { $handler = new TestAuthHandler(); return $handler->handle($request); -}); -$app->post('/test/form', function (Request $request, Response $response, $args) { - $handler = new TestFormHandler(); - return $handler->handle($request); -}); - -$app->options('/test/form', function (Request $request, Response $response, $args) { - $handler = new TestFormHandler(); - return $handler->handle($request); }); $app->get('/issue/search', function (Request $request, Response $response, $args) { diff --git a/application/src/Service/AtlassianApiService.php b/application/src/Service/AtlassianApiService.php index ea60b89..2a6c363 100644 --- a/application/src/Service/AtlassianApiService.php +++ b/application/src/Service/AtlassianApiService.php @@ -69,7 +69,7 @@ public function addIssueAttachments(string $issueId, array $files): ResponseInte "public" => true, "temporaryAttachmentIds" => $files ]; - print_r($data); + return $this->client->post('servicedeskapi/request/'.$issueId.'/attachment', [ RequestOptions::HEADERS => [ 'Accept' => 'application/json', diff --git a/application/src/Traits/RecaptchaTrait.php b/application/src/Traits/RecaptchaTrait.php index a908825..a1c3699 100644 --- a/application/src/Traits/RecaptchaTrait.php +++ b/application/src/Traits/RecaptchaTrait.php @@ -6,7 +6,7 @@ trait RecaptchaTrait { protected function validRecaptcha(?string $token, ?string $action): bool { - $secretKey = '6Lf14KYlAAAAAHDjhK4Ij9egBLOCc6s9ZzqSlL6A';//getenv('recaptcha_secret'); + $secretKey = getenv('recaptcha_secret'); // call curl to POST request $ch = curl_init();