renamed some structs to make the private
This commit is contained in:
@@ -41,18 +41,18 @@ type assetBulkUploadCheckResult struct {
|
||||
Reason string // can be "duplicate" or "unsupportedFormat" (i don't know what they mean by this)
|
||||
}
|
||||
|
||||
type APIKeyTransport struct {
|
||||
type apiKeyTransport struct {
|
||||
APIKey string
|
||||
}
|
||||
|
||||
func (t *APIKeyTransport) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
func (t *apiKeyTransport) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
req = req.Clone(req.Context())
|
||||
req.Header.Add("x-api-key", t.APIKey)
|
||||
return http.DefaultTransport.RoundTrip(req)
|
||||
}
|
||||
|
||||
func newImmichHttpClient(apiKey string) http.Client {
|
||||
transport := APIKeyTransport{
|
||||
transport := apiKeyTransport{
|
||||
APIKey: apiKey,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user