Include groups in the Account Scaffold API #924
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the current Account Scaffold API we can only see the members of entire super groups but to be able to create the emails for individual committee years ([email protected]) we need to be able to get the members of the individual groups.
This PR changes it so that instead of the /api/account-scaffold/v1/supergroups endpoint returning the members directly it returns a list of groups that in turn contain the members as well as details of the groups.
One note is that this changes the signature of the API meaning it is a breaking change and technically we could have considered having this new version under /api/v2... but as the API is not used in anything as of yet (except for a broken version of Goldapps) so I don't think there is any reason to keep the old one around.
Below is an example of the new structure.