mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
overwrite decodedDefault with the default
This commit is contained in:
+1
-1
@@ -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,
|
||||
|
||||
+2
-2
@@ -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
|
||||
);
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
);
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user