mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
update region
This commit is contained in:
parent
eff58459ef
commit
19ad2088a0
4 changed files with 5 additions and 5 deletions
|
|
@ -295,7 +295,7 @@ App::post('/v1/functions')
|
||||||
|
|
||||||
$schedule = Authorization::skip(
|
$schedule = Authorization::skip(
|
||||||
fn () => $dbForPlatform->createDocument('schedules', new Document([
|
fn () => $dbForPlatform->createDocument('schedules', new Document([
|
||||||
'region' => System::getEnv('_APP_REGION', 'default'), // Todo replace with projects region
|
'region' => $project->getAttribute('region'),
|
||||||
'resourceType' => 'function',
|
'resourceType' => 'function',
|
||||||
'resourceId' => $function->getId(),
|
'resourceId' => $function->getId(),
|
||||||
'resourceInternalId' => $function->getInternalId(),
|
'resourceInternalId' => $function->getInternalId(),
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ App::post('/v1/projects')
|
||||||
->param('projectId', '', new ProjectId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can\'t start with a special char. Max length is 36 chars.')
|
->param('projectId', '', new ProjectId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can\'t start with a special char. Max length is 36 chars.')
|
||||||
->param('name', null, new Text(128), 'Project name. Max length: 128 chars.')
|
->param('name', null, new Text(128), 'Project name. Max length: 128 chars.')
|
||||||
->param('teamId', '', new UID(), 'Team unique ID.')
|
->param('teamId', '', new UID(), 'Team unique ID.')
|
||||||
->param('region', System::getEnv('_APP_REGION', 'default'), new Whitelist(array_keys(array_filter(Config::getParam('regions'), fn ($config) => !$config['disabled']))), 'Project Region.', true)
|
->param('region', System::getEnv('_APP_REGION'), new Whitelist(array_keys(array_filter(Config::getParam('regions'), fn ($config) => !$config['disabled']))), 'Project Region.', true)
|
||||||
->param('description', '', new Text(256), 'Project description. Max length: 256 chars.', true)
|
->param('description', '', new Text(256), 'Project description. Max length: 256 chars.', true)
|
||||||
->param('logo', '', new Text(1024), 'Project logo.', true)
|
->param('logo', '', new Text(1024), 'Project logo.', true)
|
||||||
->param('url', '', new URL(), 'Project URL.', true)
|
->param('url', '', new URL(), 'Project URL.', true)
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ abstract class ScheduleBase extends Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$results = $dbForPlatform->find('schedules', \array_merge($paginationQueries, [
|
$results = $dbForPlatform->find('schedules', \array_merge($paginationQueries, [
|
||||||
Query::equal('region', [System::getEnv('_APP_REGION', 'default')]),
|
Query::equal('region', [System::getEnv('_APP_REGION')]),
|
||||||
Query::equal('resourceType', [static::getSupportedResource()]),
|
Query::equal('resourceType', [static::getSupportedResource()]),
|
||||||
Query::equal('active', [true]),
|
Query::equal('active', [true]),
|
||||||
]));
|
]));
|
||||||
|
|
@ -154,7 +154,7 @@ abstract class ScheduleBase extends Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$results = $dbForPlatform->find('schedules', \array_merge($paginationQueries, [
|
$results = $dbForPlatform->find('schedules', \array_merge($paginationQueries, [
|
||||||
Query::equal('region', [System::getEnv('_APP_REGION', 'default')]),
|
Query::equal('region', [System::getEnv('_APP_REGION')]),
|
||||||
Query::equal('resourceType', [static::getSupportedResource()]),
|
Query::equal('resourceType', [static::getSupportedResource()]),
|
||||||
Query::greaterThanEqual('resourceUpdatedAt', $lastSyncUpdate),
|
Query::greaterThanEqual('resourceUpdatedAt', $lastSyncUpdate),
|
||||||
]));
|
]));
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ class Deletes extends Action
|
||||||
$this->listByGroup(
|
$this->listByGroup(
|
||||||
'schedules',
|
'schedules',
|
||||||
[
|
[
|
||||||
Query::equal('region', [System::getEnv('_APP_REGION', 'default')]),
|
Query::equal('region', [System::getEnv('_APP_REGION')]),
|
||||||
Query::lessThanEqual('resourceUpdatedAt', $datetime),
|
Query::lessThanEqual('resourceUpdatedAt', $datetime),
|
||||||
Query::equal('active', [false]),
|
Query::equal('active', [false]),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue