diff --git a/openapi/spec/paths/api@register.yaml b/openapi/spec/paths/api@register.yaml index 3cd039930c0..2790cf40a4c 100644 --- a/openapi/spec/paths/api@register.yaml +++ b/openapi/spec/paths/api@register.yaml @@ -59,7 +59,17 @@ post: - email_marketing responses: '200': - description: User registered successfully + description: | + Invitation-based registration where the user is auto-confirmed. + Returns session credentials so the client can log in immediately. + content: + application/json: + schema: + $ref: ../components/schemas/userAuth.yaml + '204': + description: | + Open registration completed. The account requires email confirmation + before the user can log in. '400': $ref: ../components/responses/400.yaml '401': diff --git a/server/api/routes/invitation.go b/server/api/routes/invitation.go index 56cd106942c..17c97ec5676 100644 --- a/server/api/routes/invitation.go +++ b/server/api/routes/invitation.go @@ -44,7 +44,7 @@ func (h *Handler) RegisterUser(c *gateway.Context) error { return c.JSON(http.StatusOK, authInfo) } - return c.NoContent(http.StatusOK) + return c.NoContent(http.StatusNoContent) } // ResolveInvitation serves what an invite code stands for, so the accept page can route the