diff --git a/cmd/zrok/invite.go b/cmd/zrok/invite.go index 7a933586..ab4a8553 100644 --- a/cmd/zrok/invite.go +++ b/cmd/zrok/invite.go @@ -75,11 +75,11 @@ func (cmd *inviteCommand) run(_ *cobra.Command, _ []string) { } if cmd.tui.done { email := cmd.tui.emailInputs[0].Value() - token := cmd.tui.tokenInput.Value() + invToken := cmd.tui.tokenInput.Value() req := account.NewInviteParams() req.Body.Email = email - req.Body.Token = token + req.Body.InvToken = invToken _, err = zrok.Account.Invite(req) if err != nil { cmd.endpointError(env.ApiEndpoint()) diff --git a/controller/invite.go b/controller/invite.go index 3736df88..ee4ee315 100644 --- a/controller/invite.go +++ b/controller/invite.go @@ -43,9 +43,9 @@ func (h *inviteHandler) Handle(params account.InviteParams) middleware.Responder defer func() { _ = tx.Rollback() }() if h.cfg.Invites != nil && h.cfg.Invites.TokenStrategy == "store" { - inviteToken, err := str.FindInviteTokenByToken(params.Body.Token, tx) + inviteToken, err := str.FindInviteTokenByToken(params.Body.InvToken, tx) if err != nil { - logrus.Errorf("cannot get invite token '%v' for '%v': %v", params.Body.Token, params.Body.Email, err) + logrus.Errorf("cannot get invite token '%v' for '%v': %v", params.Body.InvToken, params.Body.Email, err) return account.NewInviteBadRequest().WithPayload("missing invite token") } if err := str.DeleteInviteToken(inviteToken.Id, tx); err != nil { diff --git a/rest_client_zrok/account/invite_responses.go b/rest_client_zrok/account/invite_responses.go index 9124e4c3..25de3ae8 100644 --- a/rest_client_zrok/account/invite_responses.go +++ b/rest_client_zrok/account/invite_responses.go @@ -297,8 +297,8 @@ type InviteBody struct { // email Email string `json:"email,omitempty"` - // token - Token string `json:"token,omitempty"` + // inv token + InvToken string `json:"invToken,omitempty"` } // Validate validates this invite body diff --git a/rest_server_zrok/embedded_spec.go b/rest_server_zrok/embedded_spec.go index 3481d0e3..1c2e4355 100644 --- a/rest_server_zrok/embedded_spec.go +++ b/rest_server_zrok/embedded_spec.go @@ -732,7 +732,7 @@ func init() { "email": { "type": "string" }, - "token": { + "invToken": { "type": "string" } } @@ -2909,7 +2909,7 @@ func init() { "email": { "type": "string" }, - "token": { + "invToken": { "type": "string" } } diff --git a/rest_server_zrok/operations/account/invite.go b/rest_server_zrok/operations/account/invite.go index b5ea4d93..ed8aaeca 100644 --- a/rest_server_zrok/operations/account/invite.go +++ b/rest_server_zrok/operations/account/invite.go @@ -66,8 +66,8 @@ type InviteBody struct { // email Email string `json:"email,omitempty"` - // token - Token string `json:"token,omitempty"` + // inv token + InvToken string `json:"invToken,omitempty"` } // Validate validates this invite body diff --git a/sdk/nodejs/sdk/src/zrok/api/model/inviteRequest.ts b/sdk/nodejs/sdk/src/zrok/api/model/inviteRequest.ts index 5f349467..42c54f87 100644 --- a/sdk/nodejs/sdk/src/zrok/api/model/inviteRequest.ts +++ b/sdk/nodejs/sdk/src/zrok/api/model/inviteRequest.ts @@ -14,7 +14,7 @@ import { RequestFile } from './models'; export class InviteRequest { 'email'?: string; - 'token'?: string; + 'invToken'?: string; static discriminator: string | undefined = undefined; @@ -25,8 +25,8 @@ export class InviteRequest { "type": "string" }, { - "name": "token", - "baseName": "token", + "name": "invToken", + "baseName": "invToken", "type": "string" } ]; diff --git a/sdk/python/sdk/zrok/docs/InviteBody.md b/sdk/python/sdk/zrok/docs/InviteBody.md index d7e95900..a7359008 100644 --- a/sdk/python/sdk/zrok/docs/InviteBody.md +++ b/sdk/python/sdk/zrok/docs/InviteBody.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | | [optional] -**token** | **str** | | [optional] +**inv_token** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_body.py b/sdk/python/sdk/zrok/zrok_api/models/invite_body.py index 359ca1a2..797fe804 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/invite_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/invite_body.py @@ -29,23 +29,23 @@ class InviteBody(object): """ swagger_types = { 'email': 'str', - 'token': 'str' + 'inv_token': 'str' } attribute_map = { 'email': 'email', - 'token': 'token' + 'inv_token': 'invToken' } - def __init__(self, email=None, token=None): # noqa: E501 + def __init__(self, email=None, inv_token=None): # noqa: E501 """InviteBody - a model defined in Swagger""" # noqa: E501 self._email = None - self._token = None + self._inv_token = None self.discriminator = None if email is not None: self.email = email - if token is not None: - self.token = token + if inv_token is not None: + self.inv_token = inv_token @property def email(self): @@ -69,25 +69,25 @@ def email(self, email): self._email = email @property - def token(self): - """Gets the token of this InviteBody. # noqa: E501 + def inv_token(self): + """Gets the inv_token of this InviteBody. # noqa: E501 - :return: The token of this InviteBody. # noqa: E501 + :return: The inv_token of this InviteBody. # noqa: E501 :rtype: str """ - return self._token + return self._inv_token - @token.setter - def token(self, token): - """Sets the token of this InviteBody. + @inv_token.setter + def inv_token(self, inv_token): + """Sets the inv_token of this InviteBody. - :param token: The token of this InviteBody. # noqa: E501 + :param inv_token: The inv_token of this InviteBody. # noqa: E501 :type: str """ - self._token = token + self._inv_token = inv_token def to_dict(self): """Returns the model properties as a dict""" diff --git a/specs/zrok.yml b/specs/zrok.yml index 56abac2f..b0bd0222 100644 --- a/specs/zrok.yml +++ b/specs/zrok.yml @@ -59,7 +59,7 @@ paths: properties: email: type: string - token: + invToken: type: string responses: 201: diff --git a/ui/src/api/models/InviteRequest.ts b/ui/src/api/models/InviteRequest.ts index 4bdc4f66..3f8ae0ae 100644 --- a/ui/src/api/models/InviteRequest.ts +++ b/ui/src/api/models/InviteRequest.ts @@ -30,7 +30,7 @@ export interface InviteRequest { * @type {string} * @memberof InviteRequest */ - token?: string; + invToken?: string; } /** @@ -51,7 +51,7 @@ export function InviteRequestFromJSONTyped(json: any, ignoreDiscriminator: boole return { 'email': json['email'] == null ? undefined : json['email'], - 'token': json['token'] == null ? undefined : json['token'], + 'invToken': json['invToken'] == null ? undefined : json['invToken'], }; } @@ -62,7 +62,7 @@ export function InviteRequestToJSON(value?: InviteRequest | null): any { return { 'email': value['email'], - 'token': value['token'], + 'invToken': value['invToken'], }; }