37 lines
1020 B
C#
37 lines
1020 B
C#
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 + "]";
|
|
//}
|
|
}
|
|
}
|