2020-03-30 16:10:51 +08:00
|
|
|
|
using System;
|
2020-04-13 08:35:54 +08:00
|
|
|
|
using FAuth.Extensions;
|
2020-04-10 18:15:11 +08:00
|
|
|
|
using FAuth.Models;
|
2020-03-30 16:10:51 +08:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
|
|
|
|
namespace FAuth.Controllers.api
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// api控制器基类
|
|
|
|
|
/// </summary>
|
2020-05-12 11:24:56 +08:00
|
|
|
|
[Area("api")]
|
|
|
|
|
//[ApiController]
|
|
|
|
|
[Route("api/[Controller]/[Action]")]
|
2020-04-10 18:15:11 +08:00
|
|
|
|
[ServiceFilter(typeof(ApiExceptionFilterAttribute))]
|
|
|
|
|
[ProducesResponseType(typeof(ApiErrorResult),500)]
|
2020-05-06 15:57:09 +08:00
|
|
|
|
[ProducesResponseType(typeof(ApiErrorResult),400)]
|
2020-03-30 16:10:51 +08:00
|
|
|
|
public abstract class ApiControllerBase<LoggerType>:ControllerBase<LoggerType>
|
|
|
|
|
{
|
|
|
|
|
public ApiControllerBase(ILogger<LoggerType> logger,IServiceProvider service) : base(logger,service) {
|
|
|
|
|
}
|
2020-05-12 11:24:56 +08:00
|
|
|
|
|
|
|
|
|
//public override Task OnActionExecutionAsync(ActionExecutingContext context,ActionExecutionDelegate next) {
|
|
|
|
|
// return base.OnActionExecutionAsync(context,next);
|
|
|
|
|
//}
|
2020-03-30 16:10:51 +08:00
|
|
|
|
}
|
|
|
|
|
}
|