Skip to content

Commit

Permalink
Remove account from respond_to_invite result.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Nov 5, 2024
1 parent 3eb108e commit 1e168c7
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions apis/api_invites.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ type ApiRespondToInviteRequest struct {
inviteId string
}

func (r ApiRespondToInviteRequest) Execute() (*Account, *http.Response, error) {
func (r ApiRespondToInviteRequest) Execute() (*http.Response, error) {
return r.ThisApiHandler.RespondToInviteExecute(r)
}

Expand All @@ -375,19 +375,16 @@ func (a *InvitesApi) RespondToInvite(ctx context.Context, inviteId string) ApiRe
}

// Execute executes the request
//
// @return Account
func (a *InvitesApi) RespondToInviteExecute(r ApiRespondToInviteRequest) (*Account, *http.Response, error) {
func (a *InvitesApi) RespondToInviteExecute(r ApiRespondToInviteRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []FormFile
localVarReturnValue *Account
)

localBasePath, err := a.Client.ClientConfiguration.ServerURLWithContext(r.ctx, "InvitesApi.RespondToInvite")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}

localVarPath := localBasePath + "/v1/invites/{inviteId}"
Expand All @@ -397,10 +394,10 @@ func (a *InvitesApi) RespondToInviteExecute(r ApiRespondToInviteRequest) (*Accou
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if strlen(r.inviteId) < 1 {
return localVarReturnValue, nil, reportError("inviteId must have at least 1 elements")
return nil, reportError("inviteId must have at least 1 elements")
}
if strlen(r.inviteId) > 256 {
return localVarReturnValue, nil, reportError("inviteId must have less than 256 elements")
return nil, reportError("inviteId must have less than 256 elements")
}

// to determine the Content-Type header
Expand All @@ -422,37 +419,37 @@ func (a *InvitesApi) RespondToInviteExecute(r ApiRespondToInviteRequest) (*Accou
}
req, err := a.Client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
return nil, err
}

localVarHTTPResponse, err := a.Client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
return localVarHTTPResponse, err
}

localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
return localVarHTTPResponse, err
}

if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
return localVarHTTPResponse, newErr
}

err = a.Client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
err = a.Client.decode(&localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))

Check failure on line 445 in apis/api_invites.go

View workflow job for this annotation

GitHub Actions / Build

not enough arguments in call to a.Client.decode
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
return localVarHTTPResponse, newErr
}

return localVarReturnValue, localVarHTTPResponse, nil
return localVarHTTPResponse, nil
}

0 comments on commit 1e168c7

Please sign in to comment.