diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php b/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php index 8eb74a284a..b96390fae8 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php @@ -52,6 +52,12 @@ class XList extends Base { $frameworks = Config::getParam('frameworks'); + foreach ($frameworks as $key => $framework) { + if (!empty($framework['adapters'])) { + $frameworks[$key]['adapters'] = \array_values($framework['adapters']); + } + } + $response->dynamic(new Document([ 'total' => count($frameworks), 'frameworks' => \array_values($frameworks) diff --git a/tests/e2e/Services/Sites/SitesCustomServerTest.php b/tests/e2e/Services/Sites/SitesCustomServerTest.php index 6ecb35d5a9..d9c2f31636 100644 --- a/tests/e2e/Services/Sites/SitesCustomServerTest.php +++ b/tests/e2e/Services/Sites/SitesCustomServerTest.php @@ -1364,6 +1364,11 @@ class SitesCustomServerTest extends Scope $this->assertArrayHasKey('buildRuntime', $framework); $this->assertArrayHasKey('runtimes', $framework); $this->assertArrayHasKey('adapters', $framework); + $this->assertIsArray($framework['adapters']); + $this->assertArrayHasKey('key', $framework['adapters'][0]); + $this->assertArrayHasKey('installCommand', $framework['adapters'][0]); + $this->assertArrayHasKey('buildCommand', $framework['adapters'][0]); + $this->assertArrayHasKey('outputDirectory', $framework['adapters'][0]); } public function testSiteStatic(): void