Skip to content

Commit

Permalink
Merge pull request #1 from tehplague/fix-auth-argument-order
Browse files Browse the repository at this point in the history
Use correct argument order when invoking httpclient.NewAuthenticatedClient
  • Loading branch information
martin-helmich authored Jan 23, 2025
2 parents a9debae + 7067a21 commit 338c355
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mittwaldv2/client_opt_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const apiTokenHeader = "X-Access-Token"
// The access token needs to be obtained ahead-of-time.
func WithAccessToken(token string) ClientOption {
return func(_ context.Context, inner httpclient.RequestRunner) (httpclient.RequestRunner, error) {
return httpclient.NewAuthenticatedClient(inner, apiTokenHeader, token), nil
return httpclient.NewAuthenticatedClient(inner, token, apiTokenHeader), nil
}
}

Expand Down

0 comments on commit 338c355

Please sign in to comment.