Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
laodaming 2023-08-29 10:31:34 +08:00
commit 71c60a8283
2 changed files with 4 additions and 4 deletions

View File

@ -118,7 +118,7 @@ func init() {
Auth: smtp.PlainAuth( Auth: smtp.PlainAuth(
"", "",
"support@fusenpack.com", "support@fusenpack.com",
"Fusenpack2021", "wfbjpdgvaozjvwah",
"smtp.gmail.com", "smtp.gmail.com",
), ),
FromEmail: "support@fusenpack.com", FromEmail: "support@fusenpack.com",

View File

@ -29,14 +29,14 @@ type ServiceContext struct {
func NewServiceContext(c config.Config) *ServiceContext { func NewServiceContext(c config.Config) *ServiceContext {
conn := initalize.InitMysql(c.SourceMysql) conn := initalize.InitMysql(c.SourceMysql)
// StateServer := shared.StartNode(c.ReplicaId, autoconfig.AutoGetAllServerConfig(), conn) // StateServer := shared.StartNode(c.ReplicaId, autoconfig.AutoGetAllServerConfig(), conn)
registerAddress := fmt.Sprintf("http://%s/api/auth/oauth2/register", c.MainAddress)
return &ServiceContext{ return &ServiceContext{
Config: c, Config: c,
MysqlConn: conn, MysqlConn: conn,
SharedState: nil, SharedState: nil,
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)), AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
RegisterTokenManger: auth.NewConfirmationLink[auth.RegisterToken](c.Auth.AccessSecret, "http://localhost:9900/api/auth/oauth2/register"), RegisterTokenManger: auth.NewConfirmationLink[auth.RegisterToken](c.Auth.AccessSecret, registerAddress),
ResetTokenManger: auth.NewConfirmationLink[auth.ResetToken](c.Auth.AccessSecret, "http://localhost:9900/api/auth/oauth2/register"), ResetTokenManger: auth.NewConfirmationLink[auth.ResetToken](c.Auth.AccessSecret, registerAddress),
} }
} }