features/identity-roles #14
@ -6,15 +6,15 @@ using Newsbot.Collector.Api.Domain.Response;
|
|||||||
using Newsbot.Collector.Api.Domain.Results;
|
using Newsbot.Collector.Api.Domain.Results;
|
||||||
using Newsbot.Collector.Api.Services;
|
using Newsbot.Collector.Api.Services;
|
||||||
|
|
||||||
namespace Newsbot.Collector.Api.Controllers;
|
namespace Newsbot.Collector.Api.Controllers.v1;
|
||||||
|
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Route("/api/account")]
|
[Route("/api/v1/account")]
|
||||||
public class AccountController : ControllerBase
|
public class IdentityController : ControllerBase
|
||||||
{
|
{
|
||||||
private IIdentityService _identityService;
|
private IIdentityService _identityService;
|
||||||
|
|
||||||
public AccountController(IIdentityService identityService)
|
public IdentityController(IIdentityService identityService)
|
||||||
{
|
{
|
||||||
_identityService = identityService;
|
_identityService = identityService;
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ public class AccountController : ControllerBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("addRole")]
|
[HttpPost("addRole")]
|
||||||
[Authorize(Roles = AuthorizationRoles.Administrators)]
|
[Authorize(Roles = Authorization.AdministratorsRole)]
|
||||||
public ActionResult AddRole([FromBody] AddRoleRequest request)
|
public ActionResult AddRole([FromBody] AddRoleRequest request)
|
||||||
{
|
{
|
||||||
try
|
try
|
Loading…
Reference in New Issue
Block a user