From bf299a638538b5554447b862c1b55fb03132d8e8 Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Mon, 27 Dec 2021 22:52:10 +0800 Subject: [PATCH] update --- auth/api_grp.go | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) {