You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
786 B
28 lines
786 B
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;
|
|
}
|
|
/// <summary>
|
|
/// Endpoint to return all users
|
|
/// </summary>
|
|
[Authorize]
|
|
[HttpGet, Route("accounts")]
|
|
public IEnumerable<Tbluser> GetUsers()
|
|
{
|
|
return m_userService.FetchUsers();
|
|
}
|
|
}
|
|
}
|
|
|