using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using OpenAuth.App; using OpenAuth.App.Request; using OpenAuth.App.Response; namespace OpenAuth.WebApi.Controllers { /// /// 应用管理 /// [Route("api/[controller]/[action]")] [ApiController] [ApiExplorerSettings(GroupName = "应用管理_Applications")] public class ApplicationsController : ControllerBase { private readonly AppManager _app; public ApplicationsController(AppManager app) { _app = app; } /// /// 加载应用列表 /// /// [HttpGet] public async Task Load([FromQuery]QueryAppListReq request) { var applications =await _app.GetList(request); return new TableData { data = applications, count = applications.Count }; } } }