Skip to content

Commit 12dbde0

Browse files
committed
Refactor EndpointConfig struct and remove duplicate definition
1 parent 904d4d5 commit 12dbde0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

apihandlers/jamfpro/jamfpro_api_exceptions.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ import (
77
"log"
88
)
99

10+
// EndpointConfig is a struct that holds configuration details for a specific API endpoint.
11+
// It includes what type of content it can accept and what content type it should send.
12+
type EndpointConfig struct {
13+
Accept string `json:"accept"` // Accept specifies the MIME type the endpoint can handle in responses.
14+
ContentType *string `json:"content_type"` // ContentType, if not nil, specifies the MIME type to set for requests sent to the endpoint. A pointer is used to distinguish between a missing field and an empty string.
15+
}
16+
1017
// ConfigMap is a map that associates endpoint URL patterns with their corresponding configurations.
1118
// The map's keys are strings that identify the endpoint, and the values are EndpointConfig structs
1219
// that hold the configuration for that endpoint.

apihandlers/jamfpro/jamfpro_api_handler.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ package jamfpro
22

33
import "github.com/deploymenttheory/go-api-http-client/logger"
44

5-
// EndpointConfig is a struct that holds configuration details for a specific API endpoint.
6-
// It includes what type of content it can accept and what content type it should send.
7-
type EndpointConfig struct {
8-
Accept string `json:"accept"` // Accept specifies the MIME type the endpoint can handle in responses.
9-
ContentType *string `json:"content_type"` // ContentType, if not nil, specifies the MIME type to set for requests sent to the endpoint. A pointer is used to distinguish between a missing field and an empty string.
10-
}
11-
125
// JamfAPIHandler implements the APIHandler interface for the Jamf Pro API.
136
type JamfAPIHandler struct {
147
OverrideBaseDomain string // OverrideBaseDomain is used to override the base domain for URL construction.

0 commit comments

Comments
 (0)