Moved AccountController.cs to IdentityController.cs and defined roles on a route
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
James Tombleson 2023-07-23 16:22:49 -07:00
parent c4a84e9adc
commit 3697093df1

View File

@ -6,15 +6,15 @@ using Newsbot.Collector.Api.Domain.Response;
using Newsbot.Collector.Api.Domain.Results;
using Newsbot.Collector.Api.Services;
namespace Newsbot.Collector.Api.Controllers;
namespace Newsbot.Collector.Api.Controllers.v1;
[ApiController]
[Route("/api/account")]
public class AccountController : ControllerBase
[Route("/api/v1/account")]
public class IdentityController : ControllerBase
{
private IIdentityService _identityService;
public AccountController(IIdentityService identityService)
public IdentityController(IIdentityService identityService)
{
_identityService = identityService;
}
@ -71,7 +71,7 @@ public class AccountController : ControllerBase
}
[HttpPost("addRole")]
[Authorize(Roles = AuthorizationRoles.Administrators)]
[Authorize(Roles = Authorization.AdministratorsRole)]
public ActionResult AddRole([FromBody] AddRoleRequest request)
{
try