diff --git a/handlers/club.go b/handlers/club.go index 98768ac..1c8d8c2 100644 --- a/handlers/club.go +++ b/handlers/club.go @@ -87,6 +87,8 @@ func CreateClubMember(db *sql.DB) http.HandlerFunc { var clubMember CreateClubMemberParams json.NewDecoder(r.Body).Decode(&clubMember) + clubMember.ClubNameOrAlias = mux.Vars(r)["name"] + // TODO: add parameter validation middleware. params := query.CreateClubMemberParams{ @@ -344,6 +346,8 @@ func UpdateClubMember(db *sql.DB) http.HandlerFunc { var clubMember UpdateClubMemberParams json.NewDecoder(r.Body).Decode(&clubMember) + clubMember.ClubNameOrAlias = mux.Vars(r)["name"] + // TODO: add parameter validation middleware. params := query.UpdateClubMemberParams{