1
0
Fork 0
mirror of synced 2024-09-29 08:51:28 +13:00

Merge branch 'master' of https://github.com/appwrite/appwrite into chore-prepare-1-3-1

This commit is contained in:
Torsten Dittmann 2023-04-12 18:51:00 +02:00
commit 7ca70b2ab9
6 changed files with 7 additions and 9 deletions

View file

@ -24,7 +24,7 @@
[English](README.md) | 简体中文 [English](README.md) | 简体中文
[**我们发布了 Appwrite Console 2.0 版本,点击这里了解更多!**](https://medium.com/appwrite-io/announcing-console-2-0-2e0e96891cb0?source=friends_link&sk=7a82b4069778e3adc165dc026e960fe1) [**宣布带有数据库关系的 Appwrite 1.3!了解最新消息!**](https://dev.to/appwrite/join-celebrations-appwrite-13-ships-relationships-57fc)
Appwrite是一个基于Docker的端到端开发者平台其容器化的微服务库可应用于网页端移动端以及后端。Appwrite 通过视觉化界面简化了从零开始编写 API 的繁琐过程,在保证软件安全的前提下为开发者创造了一个高效的开发环境。 Appwrite是一个基于Docker的端到端开发者平台其容器化的微服务库可应用于网页端移动端以及后端。Appwrite 通过视觉化界面简化了从零开始编写 API 的繁琐过程,在保证软件安全的前提下为开发者创造了一个高效的开发环境。

View file

@ -26,7 +26,7 @@
English | [简体中文](README-CN.md) English | [简体中文](README-CN.md)
<!-- [**Announcing Appwrite 1.3 with Database Relationships! Learn what's new!**](https://appwrite.io/graphql) --> [**Announcing Appwrite 1.3 with Database Relationships! Learn what's new!**](https://dev.to/appwrite/join-celebrations-appwrite-13-ships-relationships-57fc)
Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker<nobr> microservices. Appwrite abstracts the complexity and repetitiveness required to build a modern backend API from scratch and allows you to build secure apps faster. Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker<nobr> microservices. Appwrite abstracts the complexity and repetitiveness required to build a modern backend API from scratch and allows you to build secure apps faster.

View file

@ -1356,7 +1356,7 @@ App::get('/v1/account/prefs')
->inject('user') ->inject('user')
->action(function (Response $response, Document $user) { ->action(function (Response $response, Document $user) {
$prefs = $user->getAttribute('prefs', new \stdClass()); $prefs = $user->getAttribute('prefs', []);
$response->dynamic(new Document($prefs), Response::MODEL_PREFERENCES); $response->dynamic(new Document($prefs), Response::MODEL_PREFERENCES);
}); });

View file

@ -223,7 +223,7 @@ App::get('/v1/teams/:teamId/prefs')
throw new Exception(Exception::TEAM_NOT_FOUND); throw new Exception(Exception::TEAM_NOT_FOUND);
} }
$prefs = $team->getAttribute('prefs', new \stdClass()); $prefs = $team->getAttribute('prefs', []);
$response->dynamic(new Document($prefs), Response::MODEL_PREFERENCES); $response->dynamic(new Document($prefs), Response::MODEL_PREFERENCES);
}); });

View file

@ -457,7 +457,7 @@ App::get('/v1/users/:userId/prefs')
throw new Exception(Exception::USER_NOT_FOUND); throw new Exception(Exception::USER_NOT_FOUND);
} }
$prefs = $user->getAttribute('prefs', new \stdClass()); $prefs = $user->getAttribute('prefs', []);
$response->dynamic(new Document($prefs), Response::MODEL_PREFERENCES); $response->dynamic(new Document($prefs), Response::MODEL_PREFERENCES);
}); });

View file

@ -33,9 +33,7 @@ class V18 extends Migration
$this->migrateCollections(); $this->migrateCollections();
Console::info('Migrating Documents'); Console::info('Migrating Documents');
$this->forEachDocument(function (Document $document) { $this->forEachDocument([$this, 'fixDocument']);
$this->migrateDocument($document);
});
} }
/** /**
@ -131,7 +129,7 @@ class V18 extends Migration
* @param Document $document * @param Document $document
* @return Document * @return Document
*/ */
private function migrateDocument(Document $document): Document protected function fixDocument(Document $document): Document
{ {
switch ($document->getCollection()) { switch ($document->getCollection()) {
case 'projects': case 'projects':