This commit is contained in:
南浔
2025-06-16 19:50:39 +08:00
7 changed files with 60 additions and 4 deletions
@@ -1,4 +1,4 @@
using Apimanager_backend.Dtos;
using Apimanager_backend.Dtos;
using Apimanager_backend.Exceptions;
using Apimanager_backend.Models;
using Apimanager_backend.Services;
@@ -60,5 +60,27 @@ namespace Apimanager_backend.Controllers
}
}
[HttpGet]
public async Task<ActionResult<ResponseBase<List<SystemConfig>?>>> GetAllSystemConfig()
{
try
{
var configInfo = await systemConfigService.GetAllSystemConfig();
var res = new ResponseBase<List<SystemConfig>?>(configInfo);
return Ok(res);
}
catch (BaseException e)
{
var res = new ResponseBase<List<SystemConfig>?>(
code: e.code,
message: e.message,
data: null
);
return NotFound(res);
}
}
}
}