Closed GeorgeGoodall-GovUk closed 1 week ago
The changes involve an update to the fetchOrganisations
function in the src/middleware/organisations.middleware.js
file. The SQL query used in the fetchMany
function has been modified to include a WHERE
clause that filters organisations based on their names, specifically for those containing 'local-authority' or 'national-park-authority'. The results are now sorted alphabetically by name. There were no changes to the exported function signatures or the middleware structure.
File | Change Summary |
---|---|
src/middleware/organisations.middleware.js | Updated fetchOrganisations function's SQL query to filter and sort results. |
Objective | Addressed | Explanation |
---|---|---|
Filter organisations list on the org finder page (Issue #253) | ✅ |
In the code where queries dwell,
We filtered names, and all is well.
Local and parks now take the stage,
Alphabetical order, a new page!
Hopping through data, what a delight,
Organisations shine, all clear and bright! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Status | Category | Percentage | Covered / Total |
---|---|---|---|
🔵 | Lines | 67.75% | 4445 / 6560 |
🔵 | Statements | 67.75% | 4445 / 6560 |
🔵 | Functions | 66.43% | 188 / 283 |
🔵 | Branches | 82.32% | 545 / 662 |
File | Stmts | Branches | Functions | Lines | Uncovered Lines |
---|---|---|---|---|---|
Changed Files | |||||
src/middleware/organisations.middleware.js | 68.18% | 100% | 66.66% | 68.18% | 6-26 |
Related Tickets & Documents
Preview Link: https://submit-pr-663.herokuapp.com/organisations
Added/updated tests?
Summary by CodeRabbit