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