서비스 json 수정

This commit is contained in:
2023-08-22 11:10:59 +09:00
parent 455011fd99
commit 08cb989975
2 changed files with 4 additions and 2 deletions

View File

@ -276,7 +276,7 @@ func (caller apiCaller) serviceAPI(w http.ResponseWriter, r *http.Request) error
atomic.StorePointer(&mg.serviceptr, unsafe.Pointer(&newService))
}
w.Write(mg.service().divisionsSerialized)
w.Write(mg.service().serviceSerialized)
} else if r.Method == "POST" {
body, _ := io.ReadAll(r.Body)
var service serviceDescription

View File

@ -28,6 +28,7 @@ type blockinfo struct {
}
type whitelistmember struct {
Id primitive.ObjectID `bson:"_id" json:"_id"`
Email string `bson:"email" json:"email"`
Platform string `bson:"platform" json:"platform"`
Desc string `bson:"desc" json:"desc"`
@ -254,8 +255,9 @@ func (sh *serviceDescription) prepare(mg *Maingate) error {
sh.wl = mg.wl
sh.bl = mg.bl
sh.serviceSummarySerialized, _ = json.Marshal(sh.ServiceDescriptionSummary)
sh.serviceSerialized, _ = json.Marshal(sh)
logger.Println("service is ready :", sh.ServiceCode, string(sh.divisionsSerialized))
logger.Println("service is ready :", sh.ServiceCode, string(sh.serviceSerialized))
return nil
}