...
|
...
|
@@ -34,3 +34,24 @@ func (this *ConfigController) GetConfigScore() { |
|
|
header := controllers.GetRequestHeader(this.Ctx)
|
|
|
msg = protocol.NewReturnResponse(config.GetConfigScore(header, request))
|
|
|
}
|
|
|
|
|
|
//ServiceConfig 服务配置
|
|
|
//@router /service [post]
|
|
|
func (this *ConfigController) ServiceConfig() {
|
|
|
var msg *protocol.ResponseMessage
|
|
|
defer func() {
|
|
|
this.Resp(msg)
|
|
|
}()
|
|
|
var request *protocol.ServiceConfigRequest
|
|
|
if err := json.Unmarshal(this.ByteBody, &request); err != nil {
|
|
|
log.Error(err)
|
|
|
msg = protocol.BadRequestParam(1)
|
|
|
return
|
|
|
}
|
|
|
if b, m := this.Valid(request); !b {
|
|
|
msg = m
|
|
|
return
|
|
|
}
|
|
|
header := controllers.GetRequestHeader(this.Ctx)
|
|
|
msg = protocol.NewReturnResponse(config.ServiceConfig(header, request))
|
|
|
} |
...
|
...
|
|