new api organization

This commit is contained in:
2024-09-24 16:43:53 -05:00
parent 2ff320038d
commit 5a9995a724
6 changed files with 175 additions and 63 deletions

8
internal/api/helpers.go Normal file
View File

@@ -0,0 +1,8 @@
package api
import "net/http"
// applyAuthorization sets the Authorization header with the API token.
func (sc *SyncClient) applyAuthorization(req *http.Request) {
req.Header.Set("Authorization", "Bearer "+sc.ApiToken)
}