From ccbde6c470e9f909ee477eb031c05cf32e6a7350 Mon Sep 17 00:00:00 2001 From: Fabian Gruber Date: Fri, 18 Oct 2024 21:44:36 +0200 Subject: [PATCH] fix zone id --- src/Appwrite/Platform/Workers/Certificates.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Certificates.php b/src/Appwrite/Platform/Workers/Certificates.php index 062e9a1bb9..a182b37192 100644 --- a/src/Appwrite/Platform/Workers/Certificates.php +++ b/src/Appwrite/Platform/Workers/Certificates.php @@ -217,7 +217,7 @@ class Certificates extends Action ->addHeader('Content-Type', Client::CONTENT_TYPE_APPLICATION_JSON) ->addHeader('Authorization', 'Bearer ' . System::getEnv('_APP_SYSTEM_CLOUDFLARE_TOKEN')); - $response = $client->fetch("https://api.cloudflare.com/client/v4/zones/zone_id/custom_hostnames", Client::METHOD_POST, [ + $response = $client->fetch("https://api.cloudflare.com/client/v4/zones/b2d0e62383d3c0f6299efab107af2c7a/custom_hostnames", Client::METHOD_POST, [ 'custom_metadata' => [ 'projectId' => $project->getId(), 'organizationId' => $project->getAttribute('teamId') @@ -225,7 +225,7 @@ class Certificates extends Action 'hostname' => $hostname ]); - if ($response->getStatusCode() !== 400) { + if ($response->getStatusCode() !== 200) { throw new Exception('Failed to add custom hostname to Cloudflare: ' . $response->getBody()); } }