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

Add get single organization handler #6

Merged
merged 3 commits into from
Jul 30, 2022

Conversation

nayyara-airlangga
Copy link
Collaborator

I decided to add a handler to get a single organization by its organization code. This is so that a library user could get the organization they need without needing to get all organizations by themselves (this is done internally in the new handler) and also without having to get the organization they need from the hash map themselves.

An additional side effect from this is that we could also remove Clone trait that would otherwise be needed if we just had the orgs::get_organizations as that would return a hash map and getting a value from a hash map would return a reference instead of the actual value required in the SSOJWTClaims and SSOUser structs. The new handler would move the value out of the hash map, meaning there is no need for cloning.

@nayyara-airlangga nayyara-airlangga self-assigned this Jul 30, 2022
@nayyara-airlangga nayyara-airlangga merged commit 1d011d2 into main Jul 30, 2022
@nayyara-airlangga nayyara-airlangga deleted the get-single-organization branch July 30, 2022 15:37
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.

1 participant