mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 00:18:25 +00:00
overwrite decodedDefault with the default
This commit is contained in:
parent
12d2c80431
commit
e904fa6f9d
6 changed files with 11 additions and 11 deletions
|
|
@ -74,7 +74,7 @@ class Create extends Action
|
|||
|
||||
public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void
|
||||
{
|
||||
$decodedDefault = \is_string($default) ? \json_decode($default, true) : $default;
|
||||
$default = \is_string($default) ? \json_decode($default, true) : $default;
|
||||
|
||||
$attribute = $this->createAttribute($databaseId, $collectionId, new Document([
|
||||
'key' => $key,
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class Update extends Action
|
|||
|
||||
public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void
|
||||
{
|
||||
$decodedDefault = \is_string($default) ? \json_decode($default, true) : $default;
|
||||
$default = \is_string($default) ? \json_decode($default, true) : $default;
|
||||
|
||||
$attribute = $this->updateAttribute(
|
||||
databaseId: $databaseId,
|
||||
|
|
@ -83,7 +83,7 @@ class Update extends Action
|
|||
dbForProject: $dbForProject,
|
||||
queueForEvents: $queueForEvents,
|
||||
type: Database::VAR_LINESTRING,
|
||||
default: $decodedDefault,
|
||||
default: $default,
|
||||
required: $required,
|
||||
newKey: $newKey
|
||||
);
|
||||
|
|
|
|||
|
|
@ -74,13 +74,13 @@ class Create extends Action
|
|||
|
||||
public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void
|
||||
{
|
||||
$decodedDefault = \is_string($default) ? \json_decode($default, true) : $default;
|
||||
$default = \is_string($default) ? \json_decode($default, true) : $default;
|
||||
|
||||
$attribute = $this->createAttribute($databaseId, $collectionId, new Document([
|
||||
'key' => $key,
|
||||
'type' => Database::VAR_POINT,
|
||||
'required' => $required,
|
||||
'default' => $decodedDefault,
|
||||
'default' => $default,
|
||||
]), $response, $dbForProject, $queueForDatabase, $queueForEvents);
|
||||
|
||||
$response
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class Update extends Action
|
|||
|
||||
public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void
|
||||
{
|
||||
$decodedDefault = \is_string($default) ? \json_decode($default, true) : $default;
|
||||
$default = \is_string($default) ? \json_decode($default, true) : $default;
|
||||
|
||||
$attribute = $this->updateAttribute(
|
||||
databaseId: $databaseId,
|
||||
|
|
@ -83,7 +83,7 @@ class Update extends Action
|
|||
dbForProject: $dbForProject,
|
||||
queueForEvents: $queueForEvents,
|
||||
type: Database::VAR_POINT,
|
||||
default: $decodedDefault,
|
||||
default: $default,
|
||||
required: $required,
|
||||
newKey: $newKey
|
||||
);
|
||||
|
|
|
|||
|
|
@ -74,13 +74,13 @@ class Create extends Action
|
|||
|
||||
public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void
|
||||
{
|
||||
$decodedDefault = \is_string($default) ? \json_decode($default, true) : $default;
|
||||
$default = \is_string($default) ? \json_decode($default, true) : $default;
|
||||
|
||||
$attribute = $this->createAttribute($databaseId, $collectionId, new Document([
|
||||
'key' => $key,
|
||||
'type' => Database::VAR_POLYGON,
|
||||
'required' => $required,
|
||||
'default' => $decodedDefault,
|
||||
'default' => $default,
|
||||
]), $response, $dbForProject, $queueForDatabase, $queueForEvents);
|
||||
|
||||
$response
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class Update extends Action
|
|||
|
||||
public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void
|
||||
{
|
||||
$decodedDefault = \is_string($default) ? \json_decode($default, true) : $default;
|
||||
$default = \is_string($default) ? \json_decode($default, true) : $default;
|
||||
|
||||
$attribute = $this->updateAttribute(
|
||||
databaseId: $databaseId,
|
||||
|
|
@ -82,7 +82,7 @@ class Update extends Action
|
|||
dbForProject: $dbForProject,
|
||||
queueForEvents: $queueForEvents,
|
||||
type: Database::VAR_POLYGON,
|
||||
default: $decodedDefault,
|
||||
default: $default,
|
||||
required: $required,
|
||||
newKey: $newKey
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue