You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
690 B
23 lines
690 B
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using PaymentServer.Models;
|
|
using PaymentServer.Services;
|
|
|
|
|
|
namespace PaymentServer.Controllers
|
|
{
|
|
[Route("[controller]")]
|
|
[ApiController]
|
|
public class ContractController : ControllerBase
|
|
{
|
|
[HttpGet("{contractNumber}")]
|
|
public ActionResult<VendorPayment> Get(string contractNumber)
|
|
{
|
|
// Validating the contract number is handled by the PaymentDataService
|
|
List<VendorPayment>? payments = PaymentDataService.GetContractData(contractNumber);
|
|
if (payments == null)
|
|
return NotFound();
|
|
return Ok(payments);
|
|
}
|
|
}
|
|
}
|
|
|