first commit
This commit is contained in:
36
Complex.EndPoint/Controllers/AppCommonController.cs
Normal file
36
Complex.EndPoint/Controllers/AppCommonController.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Complex.Application.AppCommon;
|
||||
using Complex.Application.Complex;
|
||||
using Complex.Common.Dto;
|
||||
using Complex.Domain.Entities;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace Complex.EndPoint.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[ApiVersion("1")]
|
||||
[Route("api/v{version:apiVersion}/[controller]/[action]")]
|
||||
//[Route("[controller]/[action]")]
|
||||
[Authorize]
|
||||
public class AppCommonController : Controller
|
||||
{
|
||||
private readonly IAppCommonService _appCommonService;
|
||||
|
||||
public AppCommonController(IAppCommonService appCommonService)
|
||||
{
|
||||
_appCommonService = appCommonService;
|
||||
}
|
||||
[HttpGet]
|
||||
public ResultDto<Poster> GetPoster()
|
||||
{
|
||||
return _appCommonService.GetPoster();
|
||||
}
|
||||
//[Authorize]
|
||||
//[HttpGet]
|
||||
//public string test()
|
||||
//{
|
||||
// return "[" + User.Claims.First(c=>c.Type=="MobilePhone").Value + "]";
|
||||
//}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user