Skip to content

Commit

Permalink
fix Auth request
Browse files Browse the repository at this point in the history
  • Loading branch information
vtopc committed Jul 28, 2020
1 parent 336f490 commit 96a63ee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mono.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"net/http"
"strings"
"time"

"github.com/pkg/errors"
Expand Down Expand Up @@ -101,13 +100,12 @@ func (c Client) SetWebHook(ctx context.Context, uri string) error {
}

// Auth initializes access.
func (c Client) Auth(ctx context.Context, callbackURL string, permissions ...string) (*TokenRequest, error) {
func (c Client) Auth(ctx context.Context, callbackURL string) (*TokenRequest, error) {
req, err := http.NewRequest(http.MethodPost, urlPathAuth, nil)
if err != nil {
return nil, errors.Wrap(err, "failed to create request")
}

req.Header.Set("X-Permissions", strings.Join(permissions, ""))
req.Header.Set("X-Callback", callbackURL)

var v TokenRequest
Expand Down

0 comments on commit 96a63ee

Please sign in to comment.