Skip to content

Commit

Permalink
feat(DTFS2-7052): comments copy and variable name improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
avaitonis committed Apr 25, 2024
1 parent 75b34ac commit 5a0ee93
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export class OrdnanceSurveyService {
path,
headers: { 'Content-Type': 'application/json' },
onError: (error: Error) => {
console.error('Http call error happened, error %o', error);
throw new OrdnanceSurveyException('Failed to get response from Ordnance Survey API.', error);
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/modules/geospatial/geospatial.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class GeospatialService {
}

response.results.forEach((item) => {
// Item can have key DPA or LPI, get data dynamically, even if we expect key to always be DPA.
// Item can have key DPA or LPI, so we get data dynamically, even if we expect key to always be DPA.
const item_data = item[Object.keys(item)[0]];
addresses.push({
organisationName: item_data.ORGANISATION_NAME || null,
Expand Down
4 changes: 2 additions & 2 deletions test/support/generator/get-geospatial-addresses-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class GetGeospatialAddressesGenerator extends AbstractGenerator<AddressVa
],
}));

const getAddressesOrdnanceSurveyMultipleResponse: GetAddressesOrdnanceSurveyResponse = {
const getAddressesOrdnanceSurveyMultipleMatchingAddressesResponse: GetAddressesOrdnanceSurveyResponse = {
header: {
uri: 'test',
query: 'test',
Expand Down Expand Up @@ -195,7 +195,7 @@ export class GetGeospatialAddressesGenerator extends AbstractGenerator<AddressVa
getAddressByPostcodeMultipleResponse: getAddressesByPostcodeMultipleResponse,
getAddressOrdnanceSurveyResponse: getAddressesOrdnanceSurveyResponse,
getAddressOrdnanceSurveyEmptyResponse: getAddressesOrdnanceSurveyEmptyResponse,
getAddressOrdnanceSurveyMultipleResponse: getAddressesOrdnanceSurveyMultipleResponse,
getAddressOrdnanceSurveyMultipleResponse: getAddressesOrdnanceSurveyMultipleMatchingAddressesResponse,
ordnanceSurveyAuthErrorResponse,
};
}
Expand Down

0 comments on commit 5a0ee93

Please sign in to comment.