33 lines
854 B
C#
33 lines
854 B
C#
namespace LaaProduction.Web.Controllers.API.Personalization
|
|
{
|
|
using LaaProduction.Personalization.Interfaces;
|
|
using LaaProduction.Web.App_Infrastructure;
|
|
|
|
using System.Web.Http;
|
|
|
|
[AuthorizeBearer]
|
|
public class RolesController : ApiController
|
|
{
|
|
private readonly IEmployeesManager employeesManager;
|
|
|
|
public RolesController()
|
|
=> this.employeesManager = ServiceProvider.GetService<IEmployeesManager>();
|
|
|
|
[HttpGet]
|
|
public IHttpActionResult Get()
|
|
{
|
|
var employeeRoles = this.employeesManager.GetRoles();
|
|
|
|
return this.Json(employeeRoles);
|
|
}
|
|
|
|
[HttpGet]
|
|
public IHttpActionResult Find(short id)
|
|
{
|
|
var employeeRoles = this.employeesManager.GetRoles(id);
|
|
|
|
return this.Json(employeeRoles);
|
|
}
|
|
}
|
|
}
|