优化结构

This commit is contained in:
Yvan
2026-08-28 00:29:40 +08:00
parent 04ff85116c
commit 03a4131f6e
118 changed files with 758 additions and 834 deletions
-5
View File
@@ -58,7 +58,6 @@ type MenuRepo interface {
Find(context.Context, uint) (*Menu, error)
List(context.Context) ([]*Menu, error)
SetAuthorityMenus(context.Context, uint, []uint) error
AuthorityMenuIDs(context.Context, uint) ([]uint, error)
// ListAuthorityMenus returns the base menus assigned to the target
// authority. Unlike List, it must not apply the current actor's strict
// menu filter: the administration endpoint is explicitly querying another
@@ -73,10 +72,6 @@ type MenuUsecase struct{ repo MenuRepo }
func NewMenuUsecase(repo MenuRepo) *MenuUsecase { return &MenuUsecase{repo: repo} }
func (uc *MenuUsecase) List(ctx context.Context) ([]*Menu, error) {
return uc.repo.List(ctx)
}
func (uc *MenuUsecase) Tree(ctx context.Context) ([]*Menu, error) {
items, err := uc.repo.List(ctx)
if err != nil {