Merge pull request #8878 from appwrite/fix-sites-notice

Fix: unwanted notice
This commit is contained in:
Khushboo Verma 2024-10-27 22:11:50 +01:00 committed by GitHub
commit d0808e0c1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -23,7 +23,7 @@ return [
'name' => 'Personal portfolio',
'useCases' => ['starter'],
'frameworks' => [
...getFramework('SVELTEKIT', [
getFramework('SVELTEKIT', [
'serveRuntime' => 'static-1',
'installCommand' => 'npm install --force',
'providerRootDirectory' => './'

View file

@ -44,9 +44,10 @@ class GetTemplate extends Base
{
$templates = Config::getParam('site-templates', []);
$template = array_shift(\array_filter($templates, function ($item) use ($templateId) {
$allowedTemplates = \array_filter($templates, function ($item) use ($templateId) {
return $item['id'] === $templateId;
}));
});
$template = array_shift($allowedTemplates);
if (empty($template)) {
throw new Exception(Exception::SITE_TEMPLATE_NOT_FOUND);