using Brizco.Identity.Api.WebFramework.Bases;
using Microsoft.AspNetCore.Authorization;

namespace Brizco.Identity.Api.Controllers.V1;

[ApiController]
[ApiResultFilter]
[Route("api/v{version:apiVersion}/[controller]")]
[ApiVersion("1")]
[AllowAnonymous]
public class AccountController : ControllerBase
{
    private readonly IUserService _userService;

    public AccountController(IUserService userService)
    {
        _userService = userService;
    }
    [HttpGet]
    public async Task<IActionResult> GetUsersAsync(CancellationToken cancellationToken)
    {
        return Ok(await _userService.GetUsersAsync(cancellationToken));
    }
}