chore: tidy swagger comments;
feat: password reset models; feat: verification code validator
This commit is contained in:
@@ -30,7 +30,7 @@ type RegistrationBeginRequest struct {
|
||||
|
||||
type RegistrationCompleteRequest struct {
|
||||
Username string `json:"username" binding:"required" validate:"username"`
|
||||
VerificationCode string `json:"verification_code" binding:"required"`
|
||||
VerificationCode string `json:"verification_code" binding:"required" validate:"verification_code=reg"`
|
||||
Name string `json:"name" binding:"required" validate:"name"`
|
||||
Birthday *string `json:"birthday"`
|
||||
}
|
||||
@@ -57,3 +57,18 @@ type RefreshRequest struct {
|
||||
type RefreshResponse struct {
|
||||
Tokens
|
||||
}
|
||||
|
||||
type PasswordResetBeginRequest struct {
|
||||
Email string `json:"email" binding:"required,email"`
|
||||
}
|
||||
|
||||
type PasswordResetCompleteRequest struct {
|
||||
Email string `json:"email" binding:"required,email"`
|
||||
VerificationCode string `json:"verification_code" binding:"required" validate:"verification_code=reset"`
|
||||
NewPassword string `json:"password" binding:"required" validate:"password"`
|
||||
LogOutAccounts bool `json:"log_out_accounts"`
|
||||
}
|
||||
|
||||
type PasswordResetCompleteResponse struct {
|
||||
Tokens
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user