mirror of
https://github.com/clem109/drone-wechat.git
synced 2026-06-14 05:13:03 +08:00
removed url as a command line argument and added it as a constant as the API url is always the same
This commit is contained in:
@@ -89,8 +89,8 @@ func (p Plugin) Exec() error {
|
||||
var buf bytes.Buffer
|
||||
var b []byte
|
||||
|
||||
// GET request to get the access token
|
||||
accessURL := p.Config.URL + p.Config.CorpID + "&corpsecret=" + p.Config.CorpSecret
|
||||
// construct URL to get access token
|
||||
accessURL := "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + p.Config.CorpID + "&corpsecret=" + p.Config.CorpSecret
|
||||
fmt.Println("URL:>", accessURL)
|
||||
|
||||
req, err := http.NewRequest("GET", accessURL, bytes.NewBuffer(b))
|
||||
|
||||
Reference in New Issue
Block a user