OrganizationMemberParam returns the organization membership that allowed the query from the ExtractOrganizationParam handler.
(r *http.Request)
| 34 | // OrganizationMemberParam returns the organization membership that allowed the query |
| 35 | // from the ExtractOrganizationParam handler. |
| 36 | func OrganizationMemberParam(r *http.Request) OrganizationMember { |
| 37 | organizationMember, ok := r.Context().Value(organizationMemberParamContextKey{}).(OrganizationMember) |
| 38 | if !ok { |
| 39 | panic("developer error: organization member param middleware not provided") |
| 40 | } |
| 41 | return organizationMember |
| 42 | } |
| 43 | |
| 44 | func OrganizationMembersParam(r *http.Request) OrganizationMembers { |
| 45 | organizationMembers, ok := r.Context().Value(organizationMembersParamContextKey{}).(OrganizationMembers) |