Skip to content

Commit 3ea7eea

Browse files
committed
auth: add apikey to current_user route
1 parent 6687b6e commit 3ea7eea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

auth.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type authError struct {
1717
}
1818

1919
type Auth struct {
20-
client *Client
20+
client *Client
2121
}
2222

2323
type UserCredentials struct {
@@ -170,6 +170,7 @@ func (a *Auth) User(ctx context.Context, userToken string) (*User, error) {
170170
injectAuthorizationHeader(req, userToken)
171171
res := User{}
172172
errRes := authError{}
173+
req.Header.Set("apikey", a.client.apiKey)
173174
hasCustomError, err := a.client.sendCustomRequest(req, &res, &errRes)
174175
if err != nil {
175176
return nil, err

0 commit comments

Comments
 (0)