Remove response filter

This commit is contained in:
Jake Barnby 2025-08-27 14:47:40 +12:00
parent e71beeee51
commit 4d675530d6
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
2 changed files with 1 additions and 7 deletions

View file

@ -1015,9 +1015,6 @@ App::init()
if (version_compare($responseFormat, '1.7.0', '<')) {
$response->addFilter(new ResponseV19());
}
if (version_compare($responseFormat, '1.8.0', '<')) {
$response->addFilter(new ResponseV20());
}
if (version_compare($responseFormat, APP_VERSION_STABLE, '>')) {
$warnings[] = "The current SDK is built for Appwrite " . $responseFormat . ". However, the current Appwrite server version is " . APP_VERSION_STABLE . ". Please downgrade your SDK to match the Appwrite version: https://appwrite.io/docs/sdks";
}

View file

@ -12,18 +12,15 @@ class V20 extends Filter
{
$parsedResponse = $content;
$parsedResponse = match($model) {
return match($model) {
Response::MODEL_DOCUMENT => $this->parseDocument($content),
Response::MODEL_DOCUMENT_LIST => $this->handleList($content, 'documents', fn ($item) => $this->parseDocument($item)),
default => $parsedResponse,
};
return $parsedResponse;
}
protected function parseDocument(array $content): array
{
unset($content['$sequence']);
return $content;
}
}