feat: 본인 표시이름 자가수정 허용 (계정 설정용)
All checks were successful
build-and-push / build (push) Successful in 32s
All checks were successful
build-and-push / build (push) Successful in 32s
memberSelfPatch에 displayName 추가 — 유저가 계정 설정에서 표시 이름 변경 가능. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a904cbf9b9
commit
6158888417
@ -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.
|
// memberSelfPatch is the small set of fields a member may edit on their own row.
|
||||||
type memberSelfPatch struct {
|
type memberSelfPatch struct {
|
||||||
Phone *string `json:"phone"`
|
DisplayName *string `json:"displayName"`
|
||||||
Position *string `json:"position"`
|
Phone *string `json:"phone"`
|
||||||
|
Position *string `json:"position"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) handlePatchMember(w http.ResponseWriter, r *http.Request) {
|
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())
|
writeError(w, http.StatusBadRequest, err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if p.DisplayName != nil {
|
||||||
|
m.DisplayName = *p.DisplayName
|
||||||
|
}
|
||||||
if p.Phone != nil {
|
if p.Phone != nil {
|
||||||
m.Phone = *p.Phone
|
m.Phone = *p.Phone
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user