感动中国
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
Name: webset
|
||||
Host: localhost
|
||||
Port: 9913
|
||||
ReplicaId: 70
|
||||
ReplicaId: 75
|
||||
SourceMysql: "fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest"
|
||||
Auth:
|
||||
AccessSecret: fusen2023
|
||||
|
||||
@@ -15,7 +15,7 @@ func WebSetSettingHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var req types.RequestWebSet
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx.SharedState, &req)
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx, &req)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"fusenapi/server/webset/internal/config"
|
||||
"fusenapi/shared"
|
||||
"fusenapi/utils/autoconfig"
|
||||
"net/http"
|
||||
|
||||
"fusenapi/initalize"
|
||||
@@ -25,12 +24,12 @@ type ServiceContext struct {
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
conn := initalize.InitMysql(c.SourceMysql)
|
||||
StateServer := shared.StartNode(c.ReplicaId, autoconfig.AutoGetAllServerConfig(), conn)
|
||||
// StateServer := shared.StartNode(c.ReplicaId, autoconfig.AutoGetAllServerConfig(), conn)
|
||||
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
MysqlConn: conn,
|
||||
SharedState: StateServer,
|
||||
SharedState: nil,
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user