From 2ba4ae8e605c195575544dae08a76010243a01ca Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Sun, 18 May 2025 18:54:29 +0000 Subject: [PATCH] fix: request response formats for 1.7.x --- src/Appwrite/Utopia/Request/Filters/V19.php | 6 ++++++ src/Appwrite/Utopia/Response/Filters/V19.php | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/Appwrite/Utopia/Request/Filters/V19.php b/src/Appwrite/Utopia/Request/Filters/V19.php index 31296b2eb2..27b854b46f 100644 --- a/src/Appwrite/Utopia/Request/Filters/V19.php +++ b/src/Appwrite/Utopia/Request/Filters/V19.php @@ -19,6 +19,12 @@ class V19 extends Filter case 'functions.listExecutions': unset($content['search']); break; + case 'project.createVariable': + case 'project.listVariables': + case 'functions.createVariable': + case 'functions.updateVariable': + $content['secret'] = false; + break; } return $content; } diff --git a/src/Appwrite/Utopia/Response/Filters/V19.php b/src/Appwrite/Utopia/Response/Filters/V19.php index 8ab430e569..2025cb629d 100644 --- a/src/Appwrite/Utopia/Response/Filters/V19.php +++ b/src/Appwrite/Utopia/Response/Filters/V19.php @@ -16,14 +16,19 @@ class V19 extends Filter Response::MODEL_FUNCTION => $this->parseFunction($content), Response::MODEL_FUNCTION_LIST => $this->handleList($content, 'functions', fn ($item) => $this->parseFunction($item)), Response::MODEL_DEPLOYMENT => $this->parseDeployment($content), + Response::MODEL_DEPLOYMENT_LIST => $this->handleList($content, 'deployments', fn ($item) => $this->parseDeployment($item)), Response::MODEL_PROXY_RULE => $this->parseProxyRule($content), + Response::MODEL_PROXY_RULE_LIST => $this->handleList($content, 'rules', fn ($item) => $this->parseProxyRule($item)), Response::MODEL_MIGRATION => $this->parseMigration($content), + Response::MODEL_MIGRATION_LIST => $this->handleList($content, 'migrations', fn ($item) => $this->parseMigration($item)), Response::MODEL_PROJECT => $this->parseProject($content), + Response::MODEL_PROJECT_LIST => $this->handleList($content, 'projects', fn ($item) => $this->parseProject($item)), Response::MODEL_PROVIDER_REPOSITORY => $this->parseProviderRepository($content), Response::MODEL_TEMPLATE_VARIABLE => $this->parseTemplateVariable($content), Response::MODEL_USAGE_FUNCTION => $this->parseUsageFunction($content), Response::MODEL_USAGE_FUNCTIONS => $this->parseUsageFunctions($content), Response::MODEL_VARIABLE => $this->parseVariable($content), + Response::MODEL_VARIABLE_LIST => $this->handleList($content, 'variables', fn ($item) => $this->parseVariable($item)), default => $parsedResponse, };