서비스 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))
|
atomic.StorePointer(&mg.serviceptr, unsafe.Pointer(&newService))
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Write(mg.service().divisionsSerialized)
|
w.Write(mg.service().serviceSerialized)
|
||||||
} else if r.Method == "POST" {
|
} else if r.Method == "POST" {
|
||||||
body, _ := io.ReadAll(r.Body)
|
body, _ := io.ReadAll(r.Body)
|
||||||
var service serviceDescription
|
var service serviceDescription
|
||||||
|
|||||||
@ -28,6 +28,7 @@ type blockinfo struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type whitelistmember struct {
|
type whitelistmember struct {
|
||||||
|
Id primitive.ObjectID `bson:"_id" json:"_id"`
|
||||||
Email string `bson:"email" json:"email"`
|
Email string `bson:"email" json:"email"`
|
||||||
Platform string `bson:"platform" json:"platform"`
|
Platform string `bson:"platform" json:"platform"`
|
||||||
Desc string `bson:"desc" json:"desc"`
|
Desc string `bson:"desc" json:"desc"`
|
||||||
@ -254,8 +255,9 @@ func (sh *serviceDescription) prepare(mg *Maingate) error {
|
|||||||
sh.wl = mg.wl
|
sh.wl = mg.wl
|
||||||
sh.bl = mg.bl
|
sh.bl = mg.bl
|
||||||
sh.serviceSummarySerialized, _ = json.Marshal(sh.ServiceDescriptionSummary)
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user