✨ feat: unify API options structure and enhance lookup handling across collections
This commit is contained in:
@@ -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:..."
|
||||
|
||||
Reference in New Issue
Block a user