17 lines
442 B
Go
17 lines
442 B
Go
package agent
|
|
|
|
import (
|
|
"context"
|
|
|
|
v1 "git.5iot.com/iotlcm-public/iotlcm-admin-svr/api/agent/v1"
|
|
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/service"
|
|
)
|
|
|
|
func (c *ControllerV1) MenuTree(ctx context.Context, req *v1.MenuTreeReq) (res *v1.MenuTreeRes, err error) {
|
|
tree, menuIds, err := service.AgentMenu().AllowedMenuTree(ctx, 0)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &v1.MenuTreeRes{Items: tree, MenuIds: menuIds}, nil
|
|
}
|