Refactor WeChat integration to support multiple mini programs, removing hardcoded WeChat credentials and updating user model and authentication flow accordingly.
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
type Config struct {
|
||||
Server ServerConfig
|
||||
Database DatabaseConfig
|
||||
WeChat WeChatConfig
|
||||
JWT JWTConfig
|
||||
}
|
||||
|
||||
@@ -27,11 +26,6 @@ type DatabaseConfig struct {
|
||||
DBName string
|
||||
}
|
||||
|
||||
type WeChatConfig struct {
|
||||
AppID string
|
||||
AppSecret string
|
||||
}
|
||||
|
||||
type JWTConfig struct {
|
||||
Secret string
|
||||
Expire int
|
||||
@@ -57,10 +51,6 @@ func LoadConfig() {
|
||||
Password: getEnv("DB_PASSWORD", ""),
|
||||
DBName: getEnv("DB_NAME", "wx_service"),
|
||||
},
|
||||
WeChat: WeChatConfig{
|
||||
AppID: getEnv("WECHAT_APP_ID", ""),
|
||||
AppSecret: getEnv("WECHAT_APP_SECRET", ""),
|
||||
},
|
||||
JWT: JWTConfig{
|
||||
Secret: getEnv("JWT_SECRET", "your-secret-key"),
|
||||
Expire: 86400, // 24小时
|
||||
|
||||
Reference in New Issue
Block a user