mirror of
https://github.com/appwrite/appwrite
synced 2026-05-20 23:48:23 +00:00
Remove domain from deployment model
This commit is contained in:
parent
7e3b693216
commit
743ded1e79
4 changed files with 1 additions and 30 deletions
|
|
@ -6,7 +6,7 @@
|
|||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
stopOnFailure="true"
|
||||
>
|
||||
<extensions>
|
||||
<extension class="Appwrite\Tests\TestHook" />
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ use Appwrite\SDK\Response as SDKResponse;
|
|||
use Appwrite\Utopia\Response;
|
||||
use Utopia\Database\Database;
|
||||
use Utopia\Database\Document;
|
||||
use Utopia\Database\Query;
|
||||
use Utopia\Database\Validator\Authorization;
|
||||
use Utopia\Database\Validator\UID;
|
||||
use Utopia\Platform\Action;
|
||||
use Utopia\Platform\Scope\HTTP;
|
||||
|
|
@ -80,16 +78,6 @@ class Get extends Action
|
|||
$deployment->setAttribute('buildSize', $build->getAttribute('size', 0));
|
||||
$deployment->setAttribute('size', $deployment->getAttribute('size', 0));
|
||||
|
||||
$rule = Authorization::skip(fn () => $dbForPlatform->findOne('rules', [
|
||||
Query::equal("projectInternalId", [$project->getInternalId()]),
|
||||
Query::equal("resourceType", ["deployment"]),
|
||||
Query::equal("resourceInternalId", [$deployment->getInternalId()])
|
||||
]));
|
||||
|
||||
if (!empty($rule)) {
|
||||
$deployment->setAttribute('domain', $rule->getAttribute('domain', ''));
|
||||
}
|
||||
|
||||
$response->dynamic($deployment, Response::MODEL_DEPLOYMENT);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ use Utopia\Database\Database;
|
|||
use Utopia\Database\Document;
|
||||
use Utopia\Database\Exception\Query as QueryException;
|
||||
use Utopia\Database\Query;
|
||||
use Utopia\Database\Validator\Authorization;
|
||||
use Utopia\Database\Validator\Query\Cursor;
|
||||
use Utopia\Database\Validator\UID;
|
||||
use Utopia\Platform\Action;
|
||||
|
|
@ -119,16 +118,6 @@ class XList extends Action
|
|||
$result->setAttribute('buildTime', $build->getAttribute('duration', 0));
|
||||
$result->setAttribute('buildSize', $build->getAttribute('size', 0));
|
||||
$result->setAttribute('size', $result->getAttribute('size', 0));
|
||||
|
||||
$rule = Authorization::skip(fn () => $dbForPlatform->findOne('rules', [
|
||||
Query::equal("projectInternalId", [$project->getInternalId()]),
|
||||
Query::equal("resourceType", ["deployment"]),
|
||||
Query::equal("resourceInternalId", [$result->getInternalId()])
|
||||
]));
|
||||
|
||||
if (!empty($rule)) {
|
||||
$result->setAttribute('domain', $rule->getAttribute('domain', ''));
|
||||
}
|
||||
}
|
||||
|
||||
$response->dynamic(new Document([
|
||||
|
|
|
|||
|
|
@ -106,12 +106,6 @@ class Deployment extends Model
|
|||
'default' => 0,
|
||||
'example' => 128,
|
||||
])
|
||||
->addRule('domain', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Preview domain.',
|
||||
'default' => '',
|
||||
'example' => 'deploy1-project1.appwrite.site',
|
||||
])
|
||||
->addRule('providerRepositoryName', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'The name of the vcs provider repository',
|
||||
|
|
|
|||
Loading…
Reference in a new issue