gob 등록
This commit is contained in:
@ -2,7 +2,6 @@ package core
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
common "repositories.action2quare.com/ayo/gocommon"
|
||||
@ -486,14 +485,15 @@ func (sub *subTavern) UpdateGroupDocument(w http.ResponseWriter, r *http.Request
|
||||
return
|
||||
}
|
||||
|
||||
body, err := io.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
var frag bson.M
|
||||
dec := json.NewDecoder(r.Body)
|
||||
if err := dec.Decode(&frag); err != nil {
|
||||
logger.Error("UpdateGroupDocument failed. readBsonDoc err :", err)
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
if err := group.UpdateGroupDocument(gid, body); err != nil {
|
||||
if err := group.UpdateGroupDocument(gid, frag); err != nil {
|
||||
logger.Error("UpdateGroupDocument failed. group.UpdateGroupDocument returns err :", err)
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user