感动中国
This commit is contained in:
@@ -15,7 +15,7 @@ func OrderPaymentIntentHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var req types.OrderPaymentIntentReq
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx.SharedState, &req)
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx, &req)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ func OrderRefundHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var req types.OrderRefundReq
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx.SharedState, &req)
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx, &req)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ func StripeWebhookHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
|
||||
var req types.StripeWebhookReq
|
||||
|
||||
// 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/pay/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