This commit is contained in:
0xJacky 2021-10-18 23:13:47 +08:00
parent 953f943e01
commit 27c4b82d54
22 changed files with 97 additions and 85 deletions

View file

@ -45,11 +45,8 @@ type UserJson struct {
func AddUser(c *gin.Context) {
var json UserJson
ok, verrs := BindAndValid(c, &json)
ok := BindAndValid(c, &json)
if !ok {
c.JSON(http.StatusNotAcceptable, gin.H{
"errors": verrs,
})
return
}
curd := model.NewCurd(&model.Auth{})
@ -79,11 +76,9 @@ func AddUser(c *gin.Context) {
func EditUser(c *gin.Context) {
var json UserJson
ok, verrs := BindAndValid(c, &json)
ok := BindAndValid(c, &json)
if !ok {
c.JSON(http.StatusNotAcceptable, gin.H{
"errors": verrs,
})
return
}
curd := model.NewCurd(&model.Auth{})