fix getUserInfo wrong url

This commit is contained in:
iyear 2021-06-19 15:06:07 +08:00
parent f260c54314
commit 37176b753f
2 changed files with 3 additions and 4 deletions

View File

@ -43,12 +43,11 @@ func InitConfig() {
BotToken = viper.GetString("bot_token")
Cron = viper.GetString("cron")
Socks5 = viper.GetString("socks5")
//if Socks5[:5] != "socks5" {
// Socks5 = "socks5://" + Socks5
//}
viper.SetDefault("errlimit", 5)
viper.SetDefault("bindmax", 5)
viper.SetDefault("goroutine", 10)
viper.SetDefault("bindmax", 5)
BindMaxNum = viper.GetInt("bindmax")
MaxErrTimes = viper.GetInt("errlimit")

View File

@ -106,7 +106,7 @@ func (c *Client) GetUserInfo() (string, error) {
if accessToken, err = c.getToken(); err != nil {
return "", err
}
err = gout.GET(msGraUrl + "/v1.0/me/messages").
err = gout.GET(msGraUrl + "/v1.0/me").
SetHeader(gout.H{
"Authorization": accessToken,
}).