You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
622 B
27 lines
622 B
package wechatopen
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
)
|
|
|
|
func (c *Client) checkAuthorizerIsConfig(ctx context.Context) error {
|
|
authorizerAppid := c.GetAuthorizerAppid(ctx)
|
|
if authorizerAppid == "" {
|
|
return errors.New("请配置 authorizerAppid")
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (c *Client) checkAuthorizerConfig(ctx context.Context) error {
|
|
authorizerAppid := c.GetAuthorizerAppid(ctx)
|
|
if authorizerAppid == "" {
|
|
return errors.New("请配置 authorizerAppid")
|
|
}
|
|
authorizerAccessToken := c.GetAuthorizerAccessToken(ctx)
|
|
if authorizerAccessToken == "" {
|
|
return errors.New("请配置 authorizerAccessToken")
|
|
}
|
|
return nil
|
|
}
|