Fix bug on ZDT
This commit is contained in:
parent
3a5c233b59
commit
a7e95588c6
1 changed files with 2 additions and 6 deletions
|
@ -185,12 +185,6 @@ App::post('/v1/projects')
|
|||
/** @var array $collections */
|
||||
$collections = Config::getParam('collections', [])['projects'] ?? [];
|
||||
|
||||
// Allow Cloud overrides (useful for ZDT migration)
|
||||
$collectiosOverride = $hooks->trigger('getProjectCollections');
|
||||
if (!empty($collectiosOverride)) {
|
||||
$collections = $collectiosOverride;
|
||||
}
|
||||
|
||||
foreach ($collections as $key => $collection) {
|
||||
if (($collection['$collection'] ?? '') !== Database::METADATA) {
|
||||
continue;
|
||||
|
@ -225,6 +219,8 @@ App::post('/v1/projects')
|
|||
$dbForProject->createCollection($key, $attributes, $indexes);
|
||||
}
|
||||
|
||||
$hooks->trigger('afterProjectCreated'); // Useful for ZDT to mirror the project to destination
|
||||
|
||||
$response
|
||||
->setStatusCode(Response::STATUS_CODE_CREATED)
|
||||
->dynamic($project, Response::MODEL_PROJECT);
|
||||
|
|
Loading…
Reference in a new issue