From 95d2b5804e615c316b94d63946d85914289f897a Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Fri, 13 Jun 2025 13:30:13 +0800 Subject: [PATCH] fix(router): remove unused get all group route --- assets | 2 +- routers/controllers/user.go | 18 ------------------ routers/router.go | 6 ------ 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/assets b/assets index cdbc286..1c87bc1 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit cdbc2861f9b8d13ec311fd4ee394a3987a604640 +Subproject commit 1c87bc1c1652db9d31e83f74466dd6e5dc9fb16f diff --git a/routers/controllers/user.go b/routers/controllers/user.go index 84f1c5a..d9a6ef2 100644 --- a/routers/controllers/user.go +++ b/routers/controllers/user.go @@ -373,24 +373,6 @@ func UserSearch(c *gin.Context) { }) } -// GetGroupList list all groups for options -func GetGroupList(c *gin.Context) { - u, err := user.ListAllGroups(c) - if err != nil { - c.JSON(200, serializer.Err(c, err)) - c.Abort() - return - } - - hasher := dependency.FromContext(c).HashIDEncoder() - c.JSON(200, serializer.Response{ - Data: lo.Map(u, func(item *ent.Group, index int) *user.Group { - g := user.BuildGroup(item, hasher) - return user.RedactedGroup(g) - }), - }) -} - // ListPublicShare lists all public shares for given user func ListPublicShare(c *gin.Context) { service := ParametersFromContext[*share.ListShareService](c, share.ListShareParamCtx{}) diff --git a/routers/router.go b/routers/router.go index 3a6d974..3af6e4e 100644 --- a/routers/router.go +++ b/routers/router.go @@ -1101,12 +1101,6 @@ func initMasterRouter(dep dependency.Dep) *gin.Engine { } } - group := auth.Group("group") - { - // list all groups for options - group.GET("list", controllers.GetGroupList) - } - // WebDAV and devices devices := auth.Group("devices") {