Updated Auth Token usage

PostBotMessage no longer requires/uses an auth token
This commit is contained in:
densestvoid
2020-08-23 19:28:50 -04:00
parent bd76de2ffe
commit 010fd832ac
13 changed files with 48 additions and 43 deletions

View File

@ -59,11 +59,6 @@ func (r response) UnmarshalJSON(bs []byte) error {
}
func (c Client) do(req *http.Request, i interface{}) error {
URL := req.URL
query := URL.Query()
query.Set("token", c.authorizationToken)
URL.RawQuery = query.Encode()
getResp, err := c.httpClient.Do(req)
if err != nil {
return err
@ -95,3 +90,12 @@ func (c Client) do(req *http.Request, i interface{}) error {
return nil
}
func (c Client) doWithAuthToken(req *http.Request, i interface{}) error {
URL := req.URL
query := URL.Query()
query.Set("token", c.authorizationToken)
URL.RawQuery = query.Encode()
return c.do(req, i)
}