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 Get(string contractNumber) { // Validating the contract number is handled by the PaymentDataService List? payments = PaymentDataService.GetContractData(contractNumber); if (payments == null) return NotFound(); return Ok(payments); } } }