Skip to content

Commit

Permalink
Merge pull request #6 from slovensko-digital/bugfix/response-headers
Browse files Browse the repository at this point in the history
fix configuration attlasian + fix cross headers
  • Loading branch information
DominikBohucak authored Oct 1, 2023
2 parents b6ab3d4 + d81453f commit f24ed4a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
9 changes: 0 additions & 9 deletions application/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion application/src/Service/AtlassianApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion application/src/Traits/RecaptchaTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f24ed4a

Please sign in to comment.