mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-05-11 08:08:02 +08:00

fix issue #I3PE3R 会签节点异常,提示'-1' was not present in ... fix CodeSmith生成的后端代码报错 https://gitee.com/yubaolee/OpenAuth.Core/issues/I3OXJZ
39 lines
994 B
C#
39 lines
994 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
|
|
};
|
|
}
|
|
|
|
}
|
|
} |