mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-04 21:02:25 +08:00
feat(auth): getAccessToken with context (#820)
This commit is contained in:
@@ -81,7 +81,7 @@ func (auth *Auth) CheckEncryptedDataContext(ctx context2.Context, encryptedMsgHa
|
||||
var (
|
||||
at string
|
||||
)
|
||||
if at, err = auth.GetAccessToken(); err != nil {
|
||||
if at, err = auth.GetAccessTokenContext(ctx); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ func (auth *Auth) GetPhoneNumberContext(ctx context2.Context, code string) (*Get
|
||||
at string
|
||||
err error
|
||||
)
|
||||
if at, err = auth.GetAccessToken(); err != nil {
|
||||
if at, err = auth.GetAccessTokenContext(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
body := map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user