mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
self review fixes
This commit is contained in:
@@ -1,11 +1,3 @@
|
||||
# Version 1.9.2
|
||||
|
||||
### Notable changes
|
||||
|
||||
### Fixes
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
# Version 1.9.0
|
||||
|
||||
## What's Changed
|
||||
|
||||
+3
-3
@@ -72,7 +72,7 @@ docker run -it --rm \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
|
||||
--entrypoint="install" \
|
||||
appwrite/appwrite:1.9.2
|
||||
appwrite/appwrite:1.9.0
|
||||
```
|
||||
|
||||
### Windows
|
||||
@@ -84,7 +84,7 @@ docker run -it --rm ^
|
||||
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
||||
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
|
||||
--entrypoint="install" ^
|
||||
appwrite/appwrite:1.9.2
|
||||
appwrite/appwrite:1.9.0
|
||||
```
|
||||
|
||||
#### PowerShell
|
||||
@@ -94,7 +94,7 @@ docker run -it --rm `
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock `
|
||||
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
|
||||
--entrypoint="install" `
|
||||
appwrite/appwrite:1.9.2
|
||||
appwrite/appwrite:1.9.0
|
||||
```
|
||||
|
||||
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。
|
||||
|
||||
@@ -75,7 +75,7 @@ docker run -it --rm \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
|
||||
--entrypoint="install" \
|
||||
appwrite/appwrite:1.9.2
|
||||
appwrite/appwrite:1.9.0
|
||||
```
|
||||
|
||||
### Windows
|
||||
@@ -88,7 +88,7 @@ docker run -it --rm ^
|
||||
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
||||
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
|
||||
--entrypoint="install" ^
|
||||
appwrite/appwrite:1.9.2
|
||||
appwrite/appwrite:1.9.0
|
||||
```
|
||||
|
||||
#### PowerShell
|
||||
@@ -99,7 +99,7 @@ docker run -it --rm `
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock `
|
||||
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
|
||||
--entrypoint="install" `
|
||||
appwrite/appwrite:1.9.2
|
||||
appwrite/appwrite:1.9.0
|
||||
```
|
||||
|
||||
Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation.
|
||||
|
||||
@@ -357,6 +357,60 @@ trait TemplatesBase
|
||||
$this->assertFalse($after['body']['custom']);
|
||||
}
|
||||
|
||||
public function testDeleteEmailTemplateLegacyResponseFormat(): void
|
||||
{
|
||||
// Seed a custom template using the current API.
|
||||
$update = $this->updateEmailTemplate('otpSession', 'en', 'Legacy OTP', 'Legacy OTP body');
|
||||
$this->assertSame(200, $update['headers']['status-code']);
|
||||
|
||||
$headers = \array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-response-format' => '1.9.1',
|
||||
], $this->getHeaders());
|
||||
|
||||
// Request filter should accept legacy `type` and map it to `templateId`.
|
||||
$delete = $this->client->call(
|
||||
Client::METHOD_DELETE,
|
||||
'/project/templates/email',
|
||||
$headers,
|
||||
[
|
||||
'type' => 'otpSession',
|
||||
'locale' => 'en',
|
||||
],
|
||||
);
|
||||
|
||||
$this->assertSame(204, $delete['headers']['status-code']);
|
||||
$this->assertEmpty($delete['body']);
|
||||
|
||||
// Verify reset back to default.
|
||||
$after = $this->getEmailTemplate('otpSession', 'en');
|
||||
$this->assertSame(200, $after['headers']['status-code']);
|
||||
$this->assertFalse($after['body']['custom']);
|
||||
$this->assertNotSame('Legacy OTP', $after['body']['subject']);
|
||||
}
|
||||
|
||||
public function testDeleteEmailTemplateLegacyInvalidType(): void
|
||||
{
|
||||
$headers = \array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-response-format' => '1.9.1',
|
||||
], $this->getHeaders());
|
||||
|
||||
$delete = $this->client->call(
|
||||
Client::METHOD_DELETE,
|
||||
'/project/templates/email',
|
||||
$headers,
|
||||
[
|
||||
'type' => 'notATemplate',
|
||||
'locale' => 'en',
|
||||
],
|
||||
);
|
||||
|
||||
$this->assertSame(400, $delete['headers']['status-code']);
|
||||
}
|
||||
|
||||
public function testUpdateEmailTemplateLegacyInvalidType(): void
|
||||
{
|
||||
$headers = \array_merge([
|
||||
|
||||
Reference in New Issue
Block a user