diff --git a/Dfe.Academies.Api.Infrastructure/Repositories/EstablishmentRepository.cs b/Dfe.Academies.Api.Infrastructure/Repositories/EstablishmentRepository.cs index a47a33b8c..15ebc279e 100644 --- a/Dfe.Academies.Api.Infrastructure/Repositories/EstablishmentRepository.cs +++ b/Dfe.Academies.Api.Infrastructure/Repositories/EstablishmentRepository.cs @@ -43,7 +43,7 @@ public async Task> Search(string name, string ukPrn, string query = query.Where(e => e.URN == urnAsNumber); } } - return await query.ToListAsync(cancellationToken); + return await query.Take(100).ToListAsync(cancellationToken); } public async Task> GetURNsByRegion(string[] regions, CancellationToken cancellationToken) { diff --git a/TramsDataApi/Controllers/V4/TrustsController.cs b/TramsDataApi/Controllers/V4/TrustsController.cs index 3537eaae5..43f7c5d0c 100644 --- a/TramsDataApi/Controllers/V4/TrustsController.cs +++ b/TramsDataApi/Controllers/V4/TrustsController.cs @@ -36,7 +36,7 @@ public TrustsController(ITrustQueries trustQueries, ILogger lo /// /// A Trust or NotFound if not available. [HttpGet] - [Route("trust/{ukprn}")] + [Route("trust/ukprn/{ukprn}")] [SwaggerOperation(Summary = "Retrieve Trust by UK Provider Reference Number (UKPRN)", Description = "Returns a Trust identified by UK Provider Reference Number (UKPRN).")] [SwaggerResponse(200, "Successfully found and returned the Trust.")] [SwaggerResponse(404, "Trust with specified UK Provider Reference Number (UKPRN) not found.")] @@ -62,7 +62,7 @@ public async Task> GetTrustByUkprn(string ukprn, Cancella /// /// A Trust or NotFound if not available. [HttpGet] - [Route("trust/{companiesHouseNumber}")] + [Route("trust/companiesHouseNumber/{companiesHouseNumber}")] [SwaggerOperation(Summary = "Retrieve Trust by Companies House Number", Description = "Returns a Trust identified by Companies House Number.")] [SwaggerResponse(200, "Successfully found and returned the Trust.")] [SwaggerResponse(404, "Trust with specified Companies House Number not found.")]