added some govno to postgres
This commit is contained in:
+10
-1
@@ -15,7 +15,7 @@ type User struct {
|
||||
type RegisterRequest struct {
|
||||
Username string `json:"username" binding:"required,min=3,max=30" example:"john"`
|
||||
Email string `json:"email" binding:"required,email" example:"john@example.com"`
|
||||
Password string `json:"password" binding:"required,min=6" example:"secret123"`
|
||||
Password string `json:"password" binding:"required,min=8" example:"Secret123!"`
|
||||
}
|
||||
|
||||
type LoginRequest struct {
|
||||
@@ -65,6 +65,15 @@ type UserResponse struct {
|
||||
User UserPublic `json:"user"`
|
||||
}
|
||||
|
||||
type PasswordChangeRequest struct {
|
||||
OldPassword string `json:"old_password" binding:"required" example:"Secret123!"`
|
||||
NewPassword string `json:"new_password" binding:"required,min=8" example:"NewSecret456!"`
|
||||
}
|
||||
|
||||
type UpdateProfileRequest struct {
|
||||
Username string `json:"username" binding:"required,min=3,max=30" example:"john_updated"`
|
||||
}
|
||||
|
||||
type ErrorResponse struct {
|
||||
Error string `json:"error" example:"invalid email or password"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user