refactor:change standardized URL

pull/2341/head
icey-yu 1 year ago
parent 2aed1fde47
commit 19cfbb3f4d

@ -48,10 +48,10 @@ func NewClient(pushConf *config.Push, cache cache.ThirdCache, fcmConfigPath stri
// with file path // with file path
credentialsFilePath := filepath.Join(fcmConfigPath, pushConf.FCM.FilePath) credentialsFilePath := filepath.Join(fcmConfigPath, pushConf.FCM.FilePath)
opt = option.WithCredentialsFile(credentialsFilePath) opt = option.WithCredentialsFile(credentialsFilePath)
case len(pushConf.FCM.AuthUrl) != 0: case len(pushConf.FCM.AuthURL) != 0:
// with authentication URL // with authentication URL
client := httputil.NewHTTPClient(httputil.NewClientConfig()) client := httputil.NewHTTPClient(httputil.NewClientConfig())
resp, err := client.Get(pushConf.FCM.AuthUrl) resp, err := client.Get(pushConf.FCM.AuthURL)
if err != nil { if err != nil {
return nil, err return nil, err
} }

@ -203,7 +203,7 @@ type Push struct {
} `mapstructure:"geTui"` } `mapstructure:"geTui"`
FCM struct { FCM struct {
FilePath string `mapstructure:"filePath"` FilePath string `mapstructure:"filePath"`
AuthUrl string `mapstructure:"authURL"` AuthURL string `mapstructure:"authURL"`
} `mapstructure:"fcm"` } `mapstructure:"fcm"`
JPNS struct { JPNS struct {
AppKey string `mapstructure:"appKey"` AppKey string `mapstructure:"appKey"`

Loading…
Cancel
Save