diff --git a/api/index.php b/api/index.php index 8d2686a..9a9b50b 100644 --- a/api/index.php +++ b/api/index.php @@ -50,7 +50,7 @@ if (isset($_POST['sitze']) && is_array($_POST['sitze']) && count($_POST['sitze'] $response = sendAPICompanySearchRequest($username, $password, $data); // echo $response; - echo communityCSV($username, $password); + } @@ -64,6 +64,4 @@ $constructed_response = $response; //header('Content-Type: application/json'); //echo $constructed_response; - - ?> \ No newline at end of file diff --git a/api/zefixAPI.php b/api/zefixAPI.php index b5522a6..8f39769 100644 --- a/api/zefixAPI.php +++ b/api/zefixAPI.php @@ -4,6 +4,7 @@ $username = getenv("username"); $password = getenv("password"); + /** * @param string $ * @param string $ @@ -41,7 +42,6 @@ echo 'Curl error: ' . curl_error($ch); } // Close cURL session curl_close($ch); - echo $response; return $response; } @@ -81,7 +81,6 @@ function sendAPICommunityRequest(string $username, string $password): string|boo function communityCSV(string $username, string $password): string { $response = sendAPICommunityRequest($username, $password); - echo $response; $communityArray = json_decode($response, true); $csvOutput = 'bfsId,Kanton,Gemeindename,registryOfCommerceId\n'; // Create CSV rows @@ -138,5 +137,4 @@ function legalFormCSV(string $username, string $password): string { return $csvOutput; } -sendAPICommunityRequest($username, $password); ?> \ No newline at end of file diff --git a/index.php b/index.php index d96a710..b7972e5 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,6 @@ +
@@ -144,7 +147,6 @@ let communityCsvData; let legalFormsCsvData;