From 2dead545f010193a0b321b99e7dbf4bbe7cf260d Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Sun, 27 Oct 2024 15:51:17 +0100 Subject: [PATCH] Resolve PR comments --- .../Platform/Modules/Functions/Workers/Builds.php | 8 +++----- .../Platform/Modules/Sites/Http/Sites/ListSites.php | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index ff1d8f73ce..4a942b6679 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -482,14 +482,12 @@ class Builds extends Action $cpus = match ($collection) { 'functions' => $spec['cpus'] ?? APP_FUNCTION_CPUS_DEFAULT, - 'sites' => $siteVars['cpus'] ?? APP_SITE_CPUS_DEFAULT, - default => APP_FUNCTION_CPUS_DEFAULT, + 'sites' => $siteVars['cpus'] ?? APP_SITE_CPUS_DEFAULT }; $memory = match ($collection) { - 'functions' => max($spec['memory'] ?? APP_FUNCTION_MEMORY_DEFAULT, 1024), - 'sites' => max($siteVars['memory'] ?? APP_SITE_MEMORY_DEFAULT, 1024), - default => max(APP_FUNCTION_MEMORY_DEFAULT, 1024), // We have a minimum of 1024MB here because some runtimes can't compile with less memory than this. + 'functions' => max($spec['memory'] ?? APP_FUNCTION_MEMORY_DEFAULT, 1024), // We have a minimum of 1024MB here because some runtimes can't compile with less memory than this. + 'sites' => max($siteVars['memory'] ?? APP_SITE_MEMORY_DEFAULT, 1024) }; $timeout = match ($collection) { diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Sites/ListSites.php b/src/Appwrite/Platform/Modules/Sites/Http/Sites/ListSites.php index d2de7a979b..2ede480d42 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Sites/ListSites.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Sites/ListSites.php @@ -31,7 +31,7 @@ class ListSites extends Base ->setHttpPath('/v1/sites') ->desc('List sites') ->groups(['api', 'sites']) - ->label('scope', 'sites.write') + ->label('scope', 'sites.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'sites') ->label('sdk.method', 'list')