fix authorization header

AuthorizationHeaderToken requires API tokens to be prepended with "token "
This commit is contained in:
crystal 2022-05-21 04:25:59 -06:00 committed by 6543
parent c9cfee5477
commit 81c46cc887

View file

@ -32,7 +32,7 @@ func (f FileResponse) IsEmpty() bool { return len(f.Body) != 0 }
func NewClient(giteaRoot, giteaAPIToken string) *Client {
return &Client{
giteaRoot: giteaRoot,
giteaAPIToken: giteaAPIToken,
giteaAPIToken: "token " + giteaAPIToken,
}
}