feat: unify API options structure and enhance lookup handling across collections

This commit is contained in:
2026-05-17 14:53:52 +00:00
parent f332c707b7
commit bd8d413850
10 changed files with 58 additions and 112 deletions
+4 -3
View File
@@ -104,9 +104,10 @@ function ssrRequest(cacheKey, endpoint, query, options) {
}
}
}
if (options && options.params && options.params.aggregate) {
const aggregates = typeof options.params.aggregate === "string"
? options.params.aggregate.split(",")
const rawAggregate = (options && options.aggregate) || (options && options.params && options.params.aggregate);
if (rawAggregate) {
const aggregates = typeof rawAggregate === "string"
? rawAggregate.split(",")
: [];
for (const a of aggregates) {
// simple format: "collectionName:foreignField:..."