demo20230512/Controllers/Api/PCRController.cs
2023-05-12 10:20:28 +08:00

39 lines
860 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Weee.DAL;
using Weee.Filter;
using Weee.Models;
using Weee.Service;
namespace Weee.Controllers
{
[Authorize]
//[ApiMultilanguage]disable obsolete warning, not sure OK or not
public class PCRController : ApiController
{
private WeeeParameterDataService service;
public PCRController(WeeeParameterDataService s)
{
service = s;
}
[Route("api/PCR/Get/{id}")]
[HttpGet]
public PCR Get(int id)
{
return service.GetPublicPCR(id);
}
[Route("api/PCR/getPublicPCR")]
[HttpGet]
public IEnumerable<object> getPublicPCR()
{
return service.GetPublicPCRs();
}
}
}