Fix for #331
This commit is contained in:
parent
66e4866b49
commit
80927f2366
1 changed files with 1 additions and 2 deletions
|
@ -1229,9 +1229,8 @@ $utopia->post('/v1/projects/:projectId/domains')
|
||||||
->param('projectId', null, function () { return new UID(); }, 'Project unique ID.')
|
->param('projectId', null, function () { return new UID(); }, 'Project unique ID.')
|
||||||
->param('domain', null, function () { return new DomainValidator(); }, 'Domain name.')
|
->param('domain', null, function () { return new DomainValidator(); }, 'Domain name.')
|
||||||
->action(
|
->action(
|
||||||
function ($projectId) use ($request, $response, $consoleDB) {
|
function ($projectId, $domain) use ($request, $response, $consoleDB) {
|
||||||
$project = $consoleDB->getDocument($projectId);
|
$project = $consoleDB->getDocument($projectId);
|
||||||
$domain = Config::getParam('domain');
|
|
||||||
|
|
||||||
if (empty($project->getId()) || Database::SYSTEM_COLLECTION_PROJECTS != $project->getCollection()) {
|
if (empty($project->getId()) || Database::SYSTEM_COLLECTION_PROJECTS != $project->getCollection()) {
|
||||||
throw new Exception('Project not found', 404);
|
throw new Exception('Project not found', 404);
|
||||||
|
|
Loading…
Reference in a new issue