Skip to content

Conversation

@kfc35
Copy link

@kfc35 kfc35 commented Oct 8, 2025

As requested in the github issue:

  • I checked for where monthly_supporter is being returned, and it seems to be only in the v2 version of users/:id (v1 users endpoints only returns user data stored in ES documents, which doesn’t have the donor fields as far as I could tell in schema/indices/users.js).
  • A new attribute monthly_supporter_badge replaces monthly_supporter for the users/:id endpoint, which takes into account whether the user’s prefers_monthly_supporter_badge is true.
  • users/me keeps its logic of returning monthly_supporter regardless of prefers_monthly_supporter_badge

I implemented the solution as a separate query to the preferences table, but if the team is concerned and prefers it to be left joined to the original user query, that can be arranged.

Closes #479

"monthly_supporter_badge"
);
} else {
query.field( "false", "monthly_supporter_badge" );
Copy link
Author

Choose a reason for hiding this comment

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

If you’d rather this case return null instead of false, let me know. I originally had it returning null previously

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove monthly_supporter from user endpoints except users/me

1 participant