Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

Commit

Permalink
fix: use club name from the URL
Browse files Browse the repository at this point in the history
  • Loading branch information
GetPsyched committed Sep 29, 2023
1 parent 7aa5c66 commit 84832d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions handlers/club.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 84832d4

Please sign in to comment.