Skip to content

Commit

Permalink
Merge pull request #506 from DEFRA/bookmark-english-northern-ireland-…
Browse files Browse the repository at this point in the history
…50-rebase

logs for location range.
  • Loading branch information
ulysses-cognizant authored Feb 5, 2025
2 parents e1dcf43 + 7d14a6f commit 0f812a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/server/locations/helpers/location-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ function convertPointToLonLat(matches, location, index) {

function coordinatesTotal(matches, location) {
let coordinates = []
logger.info(
`::::::::::: getNIPlaces 1 matches stringify NI ::::::::::: ${JSON.stringify(matches)}`
)
try {
coordinates = matches.reduce((acc, current, index) => {
logger.info(
`::::::::::: getNIPlaces 1 current stringify NI ::::::::::: ${JSON.stringify(current)}`
)
return [
...acc,
{
Expand Down
3 changes: 3 additions & 0 deletions src/server/locations/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ const searchMiddleware = async (request, h) => {
)
return h.redirect('/location-not-found').takeover()
}
logger.info(
`::::::::::: getNIPlaces results passed to getNearestLocation en ::::::::::: ${JSON.stringify(getNIPlaces?.results)}`
)
const { nearestLocationsRange, latlon, airQuality } = getNearestLocation(
getNIPlaces?.results,
getForecasts?.forecasts,
Expand Down

0 comments on commit 0f812a2

Please sign in to comment.