Skip to content

Commit

Permalink
Merge pull request #411 from DFE-Digital/feature/get-establishment-by…
Browse files Browse the repository at this point in the history
…-trust

Added further route specifiers
  • Loading branch information
dneed-nimble authored Nov 9, 2023
2 parents 61c6674 + de0e2a3 commit 7c5e3f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public async Task<List<Establishment>> 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<IEnumerable<int>> GetURNsByRegion(string[] regions, CancellationToken cancellationToken)
{
Expand Down
4 changes: 2 additions & 2 deletions TramsDataApi/Controllers/V4/TrustsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public TrustsController(ITrustQueries trustQueries, ILogger<TrustsController> lo
/// <param name="cancellationToken"></param>
/// <returns>A Trust or NotFound if not available.</returns>
[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.")]
Expand All @@ -62,7 +62,7 @@ public async Task<ActionResult<TrustDto>> GetTrustByUkprn(string ukprn, Cancella
/// <param name="cancellationToken"></param>
/// <returns>A Trust or NotFound if not available.</returns>
[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.")]
Expand Down

0 comments on commit 7c5e3f0

Please sign in to comment.