Files
laatzen/LaaProductionWeb/LaaProduction.Web/Controllers/API/Personalization/SoftwareController.cs
T
2023-06-21 16:55:34 +02:00

37 lines
995 B
C#

namespace LaaProduction.Web.Controllers.API.Personalization
{
using LaaProduction.Personalization.Interfaces;
using LaaProduction.Web.App_Infrastructure;
using LaaProductionDI;
using System.Web.Http;
[AuthorizeBearer]
[RoutePrefix("api/Personalization/Software")]
public class SoftwareController : ApiController
{
private readonly ISoftwareManager softwareManager;
public SoftwareController()
=> this.softwareManager = LaaServiceProvider.GetService<ISoftwareManager>();
[HttpGet]
[Route(nameof(Functions))]
public IHttpActionResult Functions()
{
var employeeRoles = this.softwareManager.GetFunctions();
return this.Json(employeeRoles);
}
[HttpGet]
[Route(nameof(List))]
public IHttpActionResult List()
{
var softwares = this.softwareManager.ListSoftwares();
return this.Json(softwares);
}
}
}