diff --git a/auth/api_grp.go b/auth/api_grp.go index fe7b998..5dbd91d 100644 --- a/auth/api_grp.go +++ b/auth/api_grp.go @@ -11,6 +11,16 @@ import ( ) func ApiGrps(c *gin.Context) { + gid := c.Query("id") + if gid != "" { + grp := &Group{} + if err := DB.First(grp, "id = ?", gid).Error; err != nil { + panic(err) + } + server.OK(c, grp) + return + } + grps := []Group{} var result *gorm.DB if ACHas(c, SYSTEM) {