using Infrastructure;
using Infrastructure.Cache;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using OpenAuth.App.ServiceApp;
namespace OpenAuth.WebApi.Controllers.ServiceControllers
{
///
/// 对接
///
[Route("api/[controller]/[action]")]
[ApiController]
public class TestController: ControllerBase
{
private readonly TestApp _app;
public TestController(TestApp app)
{
_app = app;
}
///
/// 测试接口
///
///
[HttpPost]
[AllowAnonymous]
public async Task> RegistService()
{
var result = new Response();
try
{
result = await _app.RegistService();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.Message;
}
return result;
}
}
}