Fetch all meta rows when retrieving collections (#4142)

This commit is contained in:
Rijk van Zanten
2021-02-17 18:55:29 -05:00
committed by GitHub
parent 80ae253d34
commit 6661633031
2 changed files with 3 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
import { Router } from 'express';
import asyncHandler from '../utils/async-handler';
import { CollectionsService, MetaService } from '../services';
import { ForbiddenException, InvalidPayloadException } from '../exceptions';
import { ForbiddenException } from '../exceptions';
import { respond } from '../middleware/respond';
const router = Router();

View File

@@ -133,6 +133,7 @@ export class CollectionsService {
const meta = (await collectionItemsService.readByQuery({
filter: { collection: { _in: collectionKeys } },
limit: -1,
})) as CollectionMeta[];
meta.push(...systemCollectionRows);
@@ -181,6 +182,7 @@ export class CollectionsService {
const meta = (await collectionItemsService.readByQuery({
filter: { collection: { _in: tablesToFetchInfoFor } },
limit: -1,
})) as CollectionMeta[];
meta.push(...systemCollectionRows);