feat: middleware for request body parsing, validation and authentication;

feat: helper function for getting request info from gin context
This commit is contained in:
2025-06-24 17:31:48 +03:00
parent c2059dcd6e
commit cbcfb8a286
4 changed files with 59 additions and 9 deletions

View File

@@ -25,7 +25,7 @@ type Tokens struct {
type RegistrationBeginRequest struct {
Username string `json:"username" binding:"required,min=3,max=20"`
Email *string `json:"email" binding:"email"`
Password string `json:"password" binding:"required,password"` // TODO: password checking
Password string `json:"password" binding:"required"` // TODO: password checking
}
// TODO: length check