Retail_manager/RMDataManager/Controllers/ProductController.cs
s459315 35c5e1af28 Added Roles
Added role based authentication to contollers
2022-08-06 16:21:52 +02:00

23 lines
498 B
C#

using RMDataManagerLibrary.DataAcccess;
using RMDataManagerLibrary.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace RMDataManager.Controllers
{
[Authorize(Roles = "Cashier")]
public class ProductController : ApiController
{
public List<ProductModel> Get()
{
ProductData data = new ProductData();
return data.GetProducts();
}
}
}