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

@ -44,7 +44,7 @@ func (c *Client) IndexBlock(userID ID) ([]*Block, error) {
var resp struct {
Blocks []*Block `json:"blocks"`
}
err = c.do(httpReq, &resp)
err = c.doWithAuthToken(httpReq, &resp)
if err != nil {
return nil, err
}
@ -77,7 +77,7 @@ func (c *Client) BlockBetween(userID, otherUserID ID) (bool, error) {
var resp struct {
Between bool `json:"between"`
}
err = c.do(httpReq, &resp)
err = c.doWithAuthToken(httpReq, &resp)
if err != nil {
return false, err
}
@ -111,7 +111,7 @@ func (c *Client) CreateBlock(userID, otherUserID ID) (*Block, error) {
var resp struct {
Block *Block `json:"block"`
}
err = c.do(httpReq, &resp)
err = c.doWithAuthToken(httpReq, &resp)
if err != nil {
return nil, err
}
@ -142,7 +142,7 @@ func (c *Client) Unblock(userID, otherUserID ID) error {
query.Set("otherUser", otherUserID.String())
URL.RawQuery = query.Encode()
err = c.do(httpReq, nil)
err = c.doWithAuthToken(httpReq, nil)
if err != nil {
return err
}