mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 02:45:49 +02:00
bug fix
This commit is contained in:
parent
953f943e01
commit
27c4b82d54
22 changed files with 97 additions and 85 deletions
|
@ -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{})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue