This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
func UnbindDeviceHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
||||
return func(c *gin.Context) {
|
||||
var req types.UnbindDeviceRequest
|
||||
_ = c.ShouldBindJSON(&req)
|
||||
_ = c.ShouldBind(&req)
|
||||
validateErr := svcCtx.Validate(&req)
|
||||
if validateErr != nil {
|
||||
result.ParamErrorResult(c, validateErr)
|
||||
|
||||
+8
-5
@@ -107,11 +107,14 @@ func (m *Service) Start() {
|
||||
MinVersion: tls.VersionTLS12,
|
||||
},
|
||||
}
|
||||
trace.StartAgent(trace.Config{
|
||||
Name: "ppanel",
|
||||
Sampler: 1.0,
|
||||
Batcher: "",
|
||||
})
|
||||
traceCfg := m.svc.Config.Trace
|
||||
if traceCfg.Name == "" {
|
||||
traceCfg.Name = "ppanel"
|
||||
}
|
||||
if traceCfg.Sampler == 0 {
|
||||
traceCfg.Sampler = 1.0
|
||||
}
|
||||
trace.StartAgent(traceCfg)
|
||||
proc.AddShutdownListener(func() {
|
||||
trace.StopAgent()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user