파티 참가 결과로 파티 아이디를 내려보냄

This commit is contained in:
2023-11-15 16:02:22 +09:00
parent 22ac7c391c
commit 91d7eb612e

View File

@ -304,8 +304,8 @@ func (gp *groupParty) JoinParty(w http.ResponseWriter, r *http.Request) {
}
if gd == nil {
// 그룹이 없다. 실패
w.WriteHeader(http.StatusBadRequest)
// 그룹이 없다. 없을 수도 있지
gocommon.MakeEncoder(w, r).Encode("")
return
}
@ -314,9 +314,8 @@ func (gp *groupParty) JoinParty(w http.ResponseWriter, r *http.Request) {
// 이미 멤버여야 재입장 가능
path := "$._members." + gd.tid(mid) + "._body"
if _, err := gd.rh.JSONSet(gd.strid(), path, character, gocommon.RedisonSetOptionXX); err != nil {
// 멤버가 아니네? 그새 파티장이 쫓아냈나보다
logger.Println("JoinParty failed. maybe kicked by party owner :", err)
w.WriteHeader(http.StatusInternalServerError)
// 멤버가 아니네? 그새 파티장이 쫓아냈을 수도 있다.
gocommon.MakeEncoder(w, r).Encode("")
return
}
}
@ -345,6 +344,8 @@ func (gp *groupParty) JoinParty(w http.ResponseWriter, r *http.Request) {
Body: gd.loadFull(),
Tag: []string{"GroupDocFull"},
})
gocommon.MakeEncoder(w, r).Encode(gd.strid())
}
func (gp *groupParty) ConditionalClearPartyMember(w http.ResponseWriter, r *http.Request) {