From fed6cefa81fd63359d3d06996d607127773befc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Sun, 9 Mar 2025 14:50:45 +0100 Subject: [PATCH] Fix cors issues --- src/Appwrite/Platform/Modules/Functions/Http/Templates/Get.php | 1 + src/Appwrite/Platform/Modules/Functions/Http/Templates/XList.php | 1 + src/Appwrite/Platform/Modules/Sites/Http/Templates/Get.php | 1 + src/Appwrite/Platform/Modules/Sites/Http/Templates/XList.php | 1 + 4 files changed, 4 insertions(+) diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Templates/Get.php b/src/Appwrite/Platform/Modules/Functions/Http/Templates/Get.php index e624b26de6..0944cc2845 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Templates/Get.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Templates/Get.php @@ -29,6 +29,7 @@ class Get extends Base ->setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/functions/templates/:templateId') ->desc('Get function template') + ->groups(['api', 'sites']) ->label('scope', 'public') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) ->label('sdk', new Method( diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Templates/XList.php b/src/Appwrite/Platform/Modules/Functions/Http/Templates/XList.php index 619ad6a315..84f9138c32 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Templates/XList.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Templates/XList.php @@ -30,6 +30,7 @@ class XList extends Base ->setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/functions/templates') ->desc('List templates') + ->groups(['api', 'sites']) ->label('scope', 'public') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) ->label('sdk', new Method( diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Templates/Get.php b/src/Appwrite/Platform/Modules/Sites/Http/Templates/Get.php index 1c92edcf71..272caa5d81 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Templates/Get.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Templates/Get.php @@ -29,6 +29,7 @@ class Get extends Base ->setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/sites/templates/:templateId') ->desc('Get site template') + ->groups(['api', 'sites']) ->label('scope', 'public') ->label('resourceType', RESOURCE_TYPE_SITES) ->label('sdk', new Method( diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Templates/XList.php b/src/Appwrite/Platform/Modules/Sites/Http/Templates/XList.php index ae25cbcbf6..1e8f4de49a 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Templates/XList.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Templates/XList.php @@ -30,6 +30,7 @@ class XList extends Base ->setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/sites/templates') ->desc('List templates') + ->groups(['api', 'sites']) ->label('scope', 'public') ->label('resourceType', RESOURCE_TYPE_SITES) ->label('sdk', new Method(