Merge pull request #6247 from SDA-SE/feat/next-catalog-fields

Only return the selected fields from the new catalog
This commit is contained in:
Fredrik Adelöw
2021-06-30 12:15:06 +02:00
committed by GitHub
2 changed files with 12 additions and 1 deletions
@@ -133,8 +133,14 @@ export class NextEntitiesCatalog implements EntitiesCatalog {
};
}
const dbResponse = rows.map(e => JSON.parse(e.final_entity!));
const entities = dbResponse.map(e =>
request?.fields ? request.fields(e) : e,
);
return {
entities: rows.map(e => JSON.parse(e.final_entity!)),
entities,
pageInfo,
};
}