Skip to content

Commit

Permalink
Fix legacy requests for /heath/info page
Browse files Browse the repository at this point in the history
https://eaflood.atlassian.net/browse/WATER-4375

Recently we extended the functionality of our code that manages sending requests to the legacy services to [Add defra-user-id header to legacy requests](#796). This is in preparation of us managing the setup bill run process as part of changes we're doing to support two-part tariff. Some of the legacy endpoints expect the header and use it to authorize the request being made.

When we did this we overlooked the requests being made in `app/services/health/info.service.js`. The calls it was making told our logic to send the requests to the base domains for each legacy service, for example, `http://localhost:8001`. But because of the new param and a change in their order, this was being received as the user ID arg. So, we broke a number of the requests. 🤦

This change fixes the requests being made in `InfoService`.
  • Loading branch information
Cruikshanks committed Mar 26, 2024
1 parent 72a0c03 commit 5882f56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/health/info.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async function _getLegacyAppData () {
]

for (const service of services) {
const result = await LegacyRequest.get(service.serviceName, healthInfoPath, false)
const result = await LegacyRequest.get(service.serviceName, healthInfoPath, null, false)

if (result.succeeded) {
service.version = result.response.body.version
Expand Down

0 comments on commit 5882f56

Please sign in to comment.