PR review changes
This commit is contained in:
parent
2f75f9d13d
commit
85630df661
|
@ -177,12 +177,14 @@ App::post('/v1/database/collections')
|
|||
'name' => $name,
|
||||
'search' => implode(' ', [$collectionId, $name]),
|
||||
]));
|
||||
|
||||
$dbForProject->createCollection('collection_' . $collectionId);
|
||||
} catch (DuplicateException $th) {
|
||||
throw new Exception('Collection already exists', 409);
|
||||
} catch (LimitException $th) {
|
||||
throw new Exception('Collection limit exceeded', 400);
|
||||
}
|
||||
|
||||
$dbForProject->createCollection('collection_' . $collectionId);
|
||||
|
||||
$audits
|
||||
->setParam('event', 'database.collections.create')
|
||||
->setParam('resource', 'collection/'.$collectionId)
|
||||
|
|
Loading…
Reference in a new issue