mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-03-30 21:23:25 +08:00
转移.net core 3.1,为.NET 5做准备
This commit is contained in:
37
OpenAuth.WebApi/Controllers/ApplicationsController.cs
Normal file
37
OpenAuth.WebApi/Controllers/ApplicationsController.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
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]
|
||||
public class ApplicationsController : ControllerBase
|
||||
{
|
||||
private readonly AppManager _app;
|
||||
|
||||
public ApplicationsController(AppManager app)
|
||||
{
|
||||
_app = app;
|
||||
}
|
||||
/// <summary>
|
||||
/// 加载应用列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public TableData Load([FromQuery]QueryAppListReq request)
|
||||
{
|
||||
var applications = _app.GetList(request);
|
||||
return new TableData
|
||||
{
|
||||
data = applications,
|
||||
count = applications.Count
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user