Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-aleksandrboldyrev committed Jan 10, 2024
1 parent 0fc87b8 commit f763dc0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 15 additions & 5 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,23 +271,31 @@ func (c *Client) NewExternalLoggingSetupTests() *externallogging.ExternalLogging

/* Destinations */
func (c *Client) NewDestinationCreate() *destinations.DestinationCreateService {
return &destinations.DestinationCreateService{HttpService: c.NewHttpService()}
http := c.NewHttpService()
http.CommonHeaders["Accept"] = restAPIv2
return &destinations.DestinationCreateService{HttpService: http}
}

func (c *Client) NewDestinationDelete() *destinations.DestinationDeleteService {
return &destinations.DestinationDeleteService{HttpService: c.NewHttpService()}
}

func (c *Client) NewDestinationDetails() *destinations.DestinationDetailsService {
return &destinations.DestinationDetailsService{HttpService: c.NewHttpService()}
http := c.NewHttpService()
http.CommonHeaders["Accept"] = restAPIv2
return &destinations.DestinationDetailsService{HttpService: http}
}

func (c *Client) NewDestinationModify() *destinations.DestinationModifyService {
return &destinations.DestinationModifyService{HttpService: c.NewHttpService()}
http := c.NewHttpService()
http.CommonHeaders["Accept"] = restAPIv2
return &destinations.DestinationModifyService{HttpService: http}
}

func (c *Client) NewDestinationSetupTests() *destinations.DestinationSetupTestsService {
return &destinations.DestinationSetupTestsService{HttpService: c.NewHttpService()}
http := c.NewHttpService()
http.CommonHeaders["Accept"] = restAPIv2
return &destinations.DestinationSetupTestsService{HttpService: http}
}

/* Users */
Expand Down Expand Up @@ -524,7 +532,9 @@ func (c *Client) NewConnectorCreate() *connectors.ConnectorCreateService {
}

func (c *Client) NewConnectorDetails() *connectors.ConnectorDetailsService {
return &connectors.ConnectorDetailsService{HttpService: c.NewHttpService()}
http := c.NewHttpService()
http.CommonHeaders["Accept"] = restAPIv2
return &connectors.ConnectorDetailsService{HttpService: http}
}

func (c *Client) NewConnectorModify() *connectors.ConnectorModifyService {
Expand Down
2 changes: 1 addition & 1 deletion connectors/connector_schema_reload.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ func (s *ConnectorSchemaReloadService) Do(ctx context.Context) (ConnectorSchemaD
}

url := fmt.Sprintf("/connectors/%v/schemas/reload", *s.connectorID)
err := s.HttpService.Do(ctx, "POST", url, s.request(), nil, 201, &response)
err := s.HttpService.Do(ctx, "POST", url, s.request(), nil, 200, &response)
return response, err
}

0 comments on commit f763dc0

Please sign in to comment.