Skip to content

Commit a355058

Browse files
authored
Merge pull request #5998 from nhsuk/add-site-parameter-to-test-endpoint
Add optional site parameter to locations endpoint
2 parents d558a05 + a63afda commit a355058

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/controllers/api/testing/locations_controller.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ def index
1616
@locations = @locations.has_gias_year_groups(gias_year_groups)
1717
end
1818

19+
if params.key?(:site)
20+
@locations = @locations.where(site: params[:site].presence)
21+
end
22+
1923
if (is_attached_to_team = params[:is_attached_to_team]).present?
2024
academic_year = AcademicYear.pending
2125

0 commit comments

Comments
 (0)