서비스 json 수정
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user