mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-30 12:47:59 +08:00
39 lines
1007 B
C#
39 lines
1007 B
C#
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using OpenAuth.App;
|
|
using OpenAuth.App.Request;
|
|
using OpenAuth.App.Response;
|
|
|
|
namespace OpenAuth.WebApi.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 应用管理
|
|
/// </summary>
|
|
[Route("api/[controller]/[action]")]
|
|
[ApiController]
|
|
[ApiExplorerSettings(GroupName = "应用管理_Applications")]
|
|
public class ApplicationsController : ControllerBase
|
|
{
|
|
private readonly AppManager _app;
|
|
|
|
public ApplicationsController(AppManager app)
|
|
{
|
|
_app = app;
|
|
}
|
|
/// <summary>
|
|
/// 加载应用列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<TableData> Load([FromQuery]QueryAppListReq request)
|
|
{
|
|
var applications =await _app.GetList(request);
|
|
return new TableData
|
|
{
|
|
data = applications,
|
|
count = applications.Count
|
|
};
|
|
}
|
|
|
|
}
|
|
} |