Skip to content

Commit

Permalink
update imports to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rosado committed Jul 11, 2024
1 parent 67acfa9 commit 56e5f05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/fetchLocalAuthorities.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import logger from './logger'
import config from '../../config'
import logger from '../../src/utils/logger.js'
import config from '../../config/index.js'

/**
* Fetches a list of local authority names from a specified dataset.
Expand Down Expand Up @@ -36,12 +36,12 @@ export const fetchLocalAuthorities = async () => {
return row[1]
}
}).filter(name => name !== null) // Filter out null values
return names // Return the fetched data
return names
} catch (error) {
logger.error(`fetchLocalAuthorities: Error fetching local authorities data: ${error.message}`)
if (config.environment !== 'test') {
console.error(error)
}
throw error // Rethrow the error to be handled by the caller
throw error
}
}

0 comments on commit 56e5f05

Please sign in to comment.