You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
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")]
|
|
|
|
|
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
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|