added some govno to postgres

This commit is contained in:
Mephimeow
2026-06-13 18:31:22 +00:00
parent 17ffe35f5c
commit fe15c04168
20 changed files with 2174 additions and 163 deletions
+10 -1
View File
@@ -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"`
}