diff --git a/internal/httpapi/handlers_members.go b/internal/httpapi/handlers_members.go index 22ce9aa..693018b 100644 --- a/internal/httpapi/handlers_members.go +++ b/internal/httpapi/handlers_members.go @@ -63,8 +63,9 @@ func (s *Server) handleCreateMember(w http.ResponseWriter, r *http.Request) { // memberSelfPatch is the small set of fields a member may edit on their own row. type memberSelfPatch struct { - Phone *string `json:"phone"` - Position *string `json:"position"` + DisplayName *string `json:"displayName"` + Phone *string `json:"phone"` + Position *string `json:"position"` } func (s *Server) handlePatchMember(w http.ResponseWriter, r *http.Request) { @@ -104,6 +105,9 @@ func (s *Server) handlePatchMember(w http.ResponseWriter, r *http.Request) { writeError(w, http.StatusBadRequest, err.Error()) return } + if p.DisplayName != nil { + m.DisplayName = *p.DisplayName + } if p.Phone != nil { m.Phone = *p.Phone }