using Biskilog_Accounting.Shared.Interfaces;
using Biskilog_Accounting.Shared.POSModels;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Biskilog_Accounting.Server.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class UsersController : ControllerBase
{
private readonly IUser m_userService;
public UsersController(IUser a_userService)
{
m_userService = a_userService;
}
///
/// Endpoint to return all users
///
[Authorize]
[HttpGet, Route("accounts")]
public IEnumerable GetUsers()
{
return m_userService.FetchUsers();
}
}
}