using Apimanager_backend.Dtos; using Apimanager_backend.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; namespace Apimanager_backend.Controllers { [Route("api/[controller]/[action]")] [ApiController] public class SystemInfoController : ControllerBase { private readonly ISystemInfoService _systemInfoService; public SystemInfoController(ISystemInfoService systemInfoService) { _systemInfoService = systemInfoService; } [HttpGet] [Authorize(Roles = "Admin")] public async Task GetInfo() { var info = await _systemInfoService.GetSystemInfoAsync(); var res = new ResponseBase(1000,"查询成功",info); return Ok(res); } } }