diff --git a/app/config/collections.php b/app/config/collections.php index 6c517b34a..ee809e982 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -729,7 +729,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => null, 'array' => false, 'filters' => [], @@ -740,7 +740,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => null, 'array' => false, 'filters' => [], @@ -751,7 +751,7 @@ $collections = [ 'format' => '', 'size' => 0, 'signed' => true, - 'required' => true, + 'required' => false, 'default' => null, 'array' => false, 'filters' => [], diff --git a/app/controllers/general.php b/app/controllers/general.php index dabed27ee..98466dba1 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -47,7 +47,7 @@ App::init(function ($utopia, $request, $response, $console, $project, $dbForCons } else { Authorization::disable(); - $domainDocument = $dbForConsole->findOne('domain', [ + $domainDocument = $dbForConsole->findOne('domains', [ new Query('domain', QUERY::TYPE_EQUAL, [$domain->get()]) ]); @@ -55,7 +55,8 @@ App::init(function ($utopia, $request, $response, $console, $project, $dbForCons $domainDocument = new Document([ 'domain' => $domain->get(), ]); - $domainDocument = $dbForConsole->createDocument('domains', $domains); + + $domainDocument = $dbForConsole->createDocument('domains', $domainDocument); Console::info('Issuing a TLS certificate for the master domain (' . $domain->get() . ') in a few seconds...');