1
0
Fork 0
mirror of synced 2024-06-02 10:54:44 +12:00

PR review changes

This commit is contained in:
Matej Baco 2022-01-24 09:20:02 +01:00
parent 2f75f9d13d
commit 85630df661

View file

@ -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)