- fix dingding crypt bug
This commit is contained in:
@@ -31,6 +31,7 @@ const (
|
||||
)
|
||||
|
||||
type API struct {
|
||||
corpID string
|
||||
token string
|
||||
appID string
|
||||
secret string
|
||||
@@ -42,12 +43,13 @@ type API struct {
|
||||
callbackAESKey []byte
|
||||
}
|
||||
|
||||
func New(appID, secret string, config ...*platformapi.APIConfig) *API {
|
||||
func New(corpID, appID, secret string, config ...*platformapi.APIConfig) *API {
|
||||
curConfig := platformapi.DefAPIConfig
|
||||
if len(config) > 0 {
|
||||
curConfig = *config[0]
|
||||
}
|
||||
return &API{
|
||||
corpID: corpID,
|
||||
appID: appID,
|
||||
secret: secret,
|
||||
client: &http.Client{Timeout: curConfig.ClientTimeout},
|
||||
|
||||
Reference in New Issue
Block a user