Add phone registration with SMS verification and regenerate Swagger docs.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -36,6 +36,27 @@ definitions:
|
||||
required:
|
||||
- refreshToken
|
||||
type: object
|
||||
auth.RegisterDTO:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
password:
|
||||
minLength: 6
|
||||
type: string
|
||||
passwordConfirm:
|
||||
type: string
|
||||
phone:
|
||||
type: string
|
||||
username:
|
||||
minLength: 3
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- password
|
||||
- passwordConfirm
|
||||
- phone
|
||||
- username
|
||||
type: object
|
||||
auth.UpdateProfileDTO:
|
||||
properties:
|
||||
avatar:
|
||||
@@ -51,6 +72,16 @@ definitions:
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
auth.VerifyDTO:
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
phone:
|
||||
type: string
|
||||
required:
|
||||
- code
|
||||
- phone
|
||||
type: object
|
||||
branches.CreateBranchDTO:
|
||||
properties:
|
||||
active:
|
||||
@@ -4194,6 +4225,67 @@ paths:
|
||||
summary: Update reason card
|
||||
tags:
|
||||
- reason-card
|
||||
/register:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Starts registration and sends an SMS verification code. Replace
|
||||
sms.LogSender with your SMS client.
|
||||
parameters:
|
||||
- description: Registration payload
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/auth.RegisterDTO'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppSuccess'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"409":
|
||||
description: Conflict
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
summary: Register
|
||||
tags:
|
||||
- auth
|
||||
/register/verify:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Confirms the SMS code and creates the user account
|
||||
parameters:
|
||||
- description: Verification payload
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/auth.VerifyDTO'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppSuccess'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"409":
|
||||
description: Conflict
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
summary: Verify phone
|
||||
tags:
|
||||
- auth
|
||||
/role-users:
|
||||
get:
|
||||
description: Returns the authenticated user's role-user assignments with the
|
||||
|
||||
Reference in New Issue
Block a user