Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIN-5450 - Update getEservices query with delegation lookup #1116

Draft
wants to merge 4 commits into
base: pin-5444_reject-descriptor
Choose a base branch
from

Conversation

Carminepo2
Copy link
Contributor

@Carminepo2 Carminepo2 commented Oct 21, 2024

Review after #1114
Closes PIN-5450

Comment on lines +154 to +179
const producersIdsFilter = ReadModelRepository.arrayToFilter(
producersIds,
{
$or: [
{ "data.producerId": { $in: producersIds } },
{
"delegation.data.delegateId": { $in: producersIds },
"delegation.data.state": { $eq: delegationState.active },
},
],
}
);

const delegationLookup =
producersIds.length > 0
? [
{
$lookup: {
from: "delegations",
localField: "data.id",
foreignField: "data.eserviceId",
as: "delegation",
},
},
]
: [];
Copy link
Contributor Author

@Carminepo2 Carminepo2 Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussions on making the active delegations e-service implicit in the producersIds filter are still on going

@Carminepo2 Carminepo2 marked this pull request as draft October 22, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant