1
0
Fork 0
mirror of synced 2024-09-30 17:26:48 +13:00

Removed TODOs

This commit is contained in:
Matej Bačo 2022-06-22 09:46:37 +00:00
parent b682ffdfa3
commit c7087e7ac0
3 changed files with 27 additions and 13 deletions

View file

@ -1273,6 +1273,7 @@ App::post('/v1/database/collections/:collectionId/indexes')
// Convert Document[] to array of attribute metadata
$oldAttributes = \array_map(fn ($a) => $a->getArrayCopy(), $collection->getAttribute('attributes'));
$oldAttributes[] = [
'key' => '$id',
'type' => 'string',
@ -1282,7 +1283,28 @@ App::post('/v1/database/collections/:collectionId/indexes')
'default' => null,
'size' => 36
];
// TODO: Allow $createdAt, $updatedAt
$oldAttributes[] = [
'key' => '$createdAt',
'type' => 'integer',
'status' => 'available',
'signed' => false,
'required' => false,
'array' => false,
'default' => null,
'size' => 0
];
$oldAttributes[] = [
'key' => '$updatedAt',
'type' => 'integer',
'status' => 'available',
'signed' => false,
'required' => false,
'array' => false,
'default' => null,
'size' => 0
];
// lengths hidden by default
$lengths = [];

View file

@ -1127,7 +1127,8 @@ $logs = $this->getParam('logs', null);
<div class="col span-7 margin-bottom-small">
<select data-duplications data-ls-attrs="name=attributes" class="margin-bottom-no">
<option value="$id">$id</option>
<!-- TODO: Allow createdAt,updatedAt -->
<option value="$createdAt">$createdAt</option>
<option value="$updatedAt">$updatedAt</option>
<option data-ls-loop="project-collection.attributes" data-ls-as="option" data-cast-to="array" data-ls-attrs="value={{option.key}}" data-ls-bind="{{option.key}}"></option>
</select>
</div>

13
composer.lock generated
View file

@ -5346,18 +5346,9 @@
"time": "2022-05-17T05:48:52+00:00"
}
],
"aliases": [
{
"package": "utopia-php/database",
"version": "dev-feat-internal-indexes",
"alias": "0.17.1",
"alias_normalized": "0.17.1.0"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"utopia-php/database": 20
},
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {