mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
Remove response filter
This commit is contained in:
parent
e71beeee51
commit
4d675530d6
2 changed files with 1 additions and 7 deletions
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue