(r *http.Request)
| 42 | } |
| 43 | |
| 44 | func OrganizationMembersParam(r *http.Request) OrganizationMembers { |
| 45 | organizationMembers, ok := r.Context().Value(organizationMembersParamContextKey{}).(OrganizationMembers) |
| 46 | if !ok { |
| 47 | panic("developer error: organization members param middleware not provided") |
| 48 | } |
| 49 | return organizationMembers |
| 50 | } |
| 51 | |
| 52 | // ExtractOrganizationParam grabs an organization from the "organization" URL parameter. |
| 53 | // This middleware requires the API key middleware higher in the call stack for authentication. |