-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplicationServicesController.cs
More file actions
29 lines (26 loc) · 1.02 KB
/
ApplicationServicesController.cs
File metadata and controls
29 lines (26 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using ECommerceAPI.Application.Abstractions.Services.Configurations;
using ECommerceAPI.Application.CustomAttributes;
using ECommerceAPI.Application.Enums;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace ECommerceAPI.API.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize(AuthenticationSchemes = "Admin")]
public class ApplicationServicesController : ControllerBase
{
readonly IApplicationService _applicationService;
public ApplicationServicesController(IApplicationService applicationService)
{
_applicationService = applicationService;
}
[HttpGet]
[AuthorizeDefinition(ActionType = ActionType.Reading, Definition = "Get Authorize Definition Endpoints", Menu = "Application Services")]
public IActionResult GetAuthorizeDefinitionEndpoints()
{
var datas = _applicationService.GetAuthorizeDefinitionEndpoints(typeof(Program));
return Ok(datas);
}
}
}