mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Merge branch 'add-project-variable-migration' into add-webhook-migration
This commit is contained in:
commit
e4b6a4f685
1 file changed
+19
@@ -179,6 +179,19 @@ class Project extends Model
|
||||
'example' => new \stdClass(),
|
||||
'array' => true,
|
||||
])
|
||||
->addRule('blocks', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Project blocks information.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true,
|
||||
])
|
||||
->addRule('consoleAccessedAt', [
|
||||
'type' => self::TYPE_DATETIME,
|
||||
'description' => 'Last time the project was accessed via console.',
|
||||
'default' => '',
|
||||
'example' => self::TYPE_DATETIME_EXAMPLE,
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
@@ -213,10 +226,16 @@ class Project extends Model
|
||||
$this->expandServices($document);
|
||||
$this->expandProtocols($document);
|
||||
$this->expandAuthMethods($document);
|
||||
$this->expandConsoleAccessedAt($document);
|
||||
|
||||
return $document;
|
||||
}
|
||||
|
||||
private function expandConsoleAccessedAt(Document $document): void
|
||||
{
|
||||
$document->setAttribute('consoleAccessedAt', $document->getAttribute('accessedAt', ''));
|
||||
}
|
||||
|
||||
private function expandSmtpFields(Document $document): void
|
||||
{
|
||||
if (!$document->isSet('smtp')) {
|
||||
|
||||
Reference in new issue
Block a user