master
Evan Chen 2021-12-19 22:30:50 +08:00
parent ea1c75f0e7
commit a5342c3ef5
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ func ApiGrpUpdate(c *gin.Context) {
if err := c.ShouldBindJSON(&data); err != nil { if err := c.ShouldBindJSON(&data); err != nil {
panic(err) panic(err)
} }
grp := &Group{} grp := &Group{Name: data.Name}
err := DB.First(grp, data.ID).Error err := DB.First(grp, data.ID).Error
if err != nil { if err != nil {
panic(errors.NewError(404, err)) panic(errors.NewError(404, err))