22 lines
519 B
C#
22 lines
519 B
C#
![]() |
using Microsoft.AspNetCore.Authorization;
|
|||
|
using Microsoft.AspNetCore.Http;
|
|||
|
using Microsoft.AspNetCore.Mvc;
|
|||
|
using RMDataManagerLibrary.DataAcccess;
|
|||
|
using RMDataManagerLibrary.Models;
|
|||
|
|
|||
|
namespace RMApi.Controllers
|
|||
|
{
|
|||
|
[Route("api/[controller]")]
|
|||
|
[ApiController]
|
|||
|
[Authorize(Roles = "Cashier")]
|
|||
|
public class ProductController : ControllerBase
|
|||
|
{
|
|||
|
public List<ProductModel> Get()
|
|||
|
{
|
|||
|
ProductData data = new ProductData();
|
|||
|
|
|||
|
return data.GetProducts();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|