more fixes on collection
This commit is contained in:
parent
acfad597fa
commit
119035463a
|
@ -226,17 +226,17 @@ App::get('/console/database/collection')
|
|||
->param('id', '', new UID(), 'Collection unique ID.')
|
||||
->inject('response')
|
||||
->inject('layout')
|
||||
->inject('projectDB')
|
||||
->action(function ($id, $response, $layout, $projectDB) {
|
||||
->inject('dbForExternal')
|
||||
->action(function ($id, $response, $layout, $dbForExternal) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Utopia\View $layout */
|
||||
/** @var Appwrite\Database\Database $projectDB */
|
||||
/** @var Utopia\Database\Database $dbForExternal */
|
||||
|
||||
Authorization::disable();
|
||||
$collection = $projectDB->getDocument($id, false);
|
||||
$collection = $dbForExternal->getCollection($id);
|
||||
Authorization::reset();
|
||||
|
||||
if ($collection->isEmpty() || Database::SYSTEM_COLLECTION_COLLECTIONS != $collection->getCollection()) {
|
||||
if ($collection->isEmpty()) {
|
||||
throw new Exception('Collection not found', 404);
|
||||
}
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ $maxCells = 10;
|
|||
<label> </label>
|
||||
|
||||
<div class="box">
|
||||
<label for="collection-name">ID</label>
|
||||
<label for="collection-id">ID</label>
|
||||
<input name="collectionId" id="collectionId" type="text" autocomplete="off" data-ls-bind="{{project-collection.collectionId}}" data-forms-text-direction required placeholder="Collection Id" maxlength="128" />
|
||||
|
||||
<label for="collection-name">Name</label>
|
||||
|
|
|
@ -94,7 +94,10 @@
|
|||
data-failure-param-alert-text="Failed to create collection"
|
||||
data-failure-param-alert-classname="error">
|
||||
|
||||
<label for="user-name">Name</label>
|
||||
<label for="collection-id">ID</label>
|
||||
<input type="text" class="full-width" id="collection-id" name="collectionId" required autocomplete="off" maxlength="128" />
|
||||
|
||||
<label for="collection-name">Name</label>
|
||||
<input type="text" class="full-width" id="collection-name" name="name" required autocomplete="off" maxlength="128" />
|
||||
|
||||
<input type="hidden" id="collection-read" name="read" required data-cast-to="json" value="<?php echo htmlentities(json_encode([])); ?>" />
|
||||
|
|
Loading…
Reference in a new issue