Merge branch 'feat-messages-event-config' of https://github.com/appwrite/appwrite into feat-mailgun-provider
This commit is contained in:
commit
6affa6b5a0
5 changed files with 8 additions and 8 deletions
|
@ -1475,7 +1475,7 @@ App::get('/v1/users/usage')
|
|||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||
->label('sdk.response.model', Response::MODEL_USAGE_USERS)
|
||||
->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true)
|
||||
->param('provider', '', new WhiteList(\array_merge(['email', 'anonymous'], \array_map(fn ($value) => "oauth-" . $value, \array_keys(Config::getParam('providers', [])))), true), 'Provider Name.', true)
|
||||
->param('provider', '', new WhiteList(\array_merge(['email', 'anonymous'], \array_map(fn ($value) => "oauth-" . $value, \array_keys(Config::getParam('authProviders', [])))), true), 'Provider Name.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('register')
|
||||
|
|
|
@ -333,7 +333,7 @@ class Response extends SwooleResponse
|
|||
->setModel(new BaseList('Projects List', self::MODEL_PROJECT_LIST, 'projects', self::MODEL_PROJECT, true, false))
|
||||
->setModel(new BaseList('Webhooks List', self::MODEL_WEBHOOK_LIST, 'webhooks', self::MODEL_WEBHOOK, true, false))
|
||||
->setModel(new BaseList('API Keys List', self::MODEL_KEY_LIST, 'keys', self::MODEL_KEY, true, false))
|
||||
->setModel(new BaseList('Providers List', self::MODEL_AUTH_PROVIDER_LIST, 'platforms', self::MODEL_AUTH_PROVIDER, true, false))
|
||||
->setModel(new BaseList('Auth Providers List', self::MODEL_AUTH_PROVIDER_LIST, 'platforms', self::MODEL_AUTH_PROVIDER, true, false))
|
||||
->setModel(new BaseList('Platforms List', self::MODEL_PLATFORM_LIST, 'platforms', self::MODEL_PLATFORM, true, false))
|
||||
->setModel(new BaseList('Countries List', self::MODEL_COUNTRY_LIST, 'countries', self::MODEL_COUNTRY))
|
||||
->setModel(new BaseList('Continents List', self::MODEL_CONTINENT_LIST, 'continents', self::MODEL_CONTINENT))
|
||||
|
|
|
@ -88,9 +88,9 @@ class V16 extends Filter
|
|||
|
||||
protected function parseProject(array $content)
|
||||
{
|
||||
foreach ($content['providers'] ?? [] as $i => $provider) {
|
||||
$content['providers'][$i]['name'] = \ucfirst($provider['key']);
|
||||
unset($content['providers'][$i]['key']);
|
||||
foreach ($content['authProviders'] ?? [] as $i => $provider) {
|
||||
$content['authProviders'][$i]['name'] = \ucfirst($provider['key']);
|
||||
unset($content['authProviders'][$i]['key']);
|
||||
}
|
||||
|
||||
$content['domains'] = [];
|
||||
|
|
|
@ -348,7 +348,7 @@ class Project extends Model
|
|||
]);
|
||||
}
|
||||
|
||||
$document->setAttribute("providers", $projectProviders);
|
||||
$document->setAttribute("authProviders", $projectProviders);
|
||||
|
||||
return $document;
|
||||
}
|
||||
|
|
|
@ -825,7 +825,7 @@ class ProjectsConsoleClientTest extends Scope
|
|||
|
||||
foreach ($providers as $key => $provider) {
|
||||
$asserted = false;
|
||||
foreach ($response['body']['providers'] as $responseProvider) {
|
||||
foreach ($response['body']['authProviders'] as $responseProvider) {
|
||||
if ($responseProvider['key'] === $key) {
|
||||
$this->assertEquals('AppId-' . ucfirst($key), $responseProvider['appId']);
|
||||
$this->assertEquals('Secret-' . ucfirst($key), $responseProvider['secret']);
|
||||
|
@ -867,7 +867,7 @@ class ProjectsConsoleClientTest extends Scope
|
|||
$i = 0;
|
||||
foreach ($providers as $key => $provider) {
|
||||
$asserted = false;
|
||||
foreach ($response['body']['providers'] as $responseProvider) {
|
||||
foreach ($response['body']['authProviders'] as $responseProvider) {
|
||||
if ($responseProvider['key'] === $key) {
|
||||
// On first provider, test enabled=false
|
||||
$this->assertEquals($i !== 0, $responseProvider['enabled']);
|
||||
|
|
Loading…
Reference in a new issue