refactor routes,
tronnet/workflows: Static Analysis -- Golang / static-go (push) Successful in 30s

use json encoding for route body parameters,
implement modify user/group/pool operations,
simplify schema by using comon lib struct tags and RequireAll and AtLeastOne helper functions,
properly implement locadb as Backend interface
This commit is contained in:
alu
2026-08-21 20:49:15 +00:00
parent 670f7d4999
commit 4783d79523
13 changed files with 959 additions and 606 deletions
+2 -16
View File
@@ -1,21 +1,7 @@
package app
type Login struct { // login body struct
UsernameRaw string `form:"username" binding:"required"`
UsernameRaw string `json:"username" binding:"required"`
Username Username
Password string `form:"password" binding:"required"`
}
type UserFormRequired struct { // add user body struct
CN string `form:"cn" binding:"required"`
SN string `form:"sn" binding:"required"`
Mail string `form:"mail" binding:"required"`
Password string `form:"password" binding:"required"`
}
type UserFormOptional struct { // modify user body struct
CN string `form:"cn"`
SN string `form:"sn"`
Mail string `form:"mail"`
Password string `form:"password"`
Password string `json:"password" binding:"required"`
}