LingAdmin/Backend/Services/ApiGateway/LingAdmin.ApiGateway/Controllers/MenusController.cs

26 lines
742 B
C#
Raw Permalink Normal View History

2026-04-16 18:13:06 +08:00
using Microsoft.AspNetCore.Mvc;
namespace LingAdmin.ApiGateway.Controllers;
/// <summary>
/// 菜单控制器 - 提供导航菜单
/// </summary>
[ApiController]
[Route("api/[controller]")]
public class MenusController : ControllerBase
{
[HttpGet]
public ActionResult<object> GetMenus()
{
var menus = new[]
{
new { name = "menu.dashboard", path = "/", icon = "LayoutDashboard" },
new { name = "menu.users", path = "/users", icon = "Users" },
new { name = "menu.requisitions", path = "/requisitions", icon = "FileText" },
new { name = "menu.settings", path = "/settings", icon = "Settings" }
};
return Ok(new { code = 200, data = menus });
}
}