Skip to content

Commit bf61547

Browse files
Merge pull request #127 from companieshouse/BI-7513-update-sdk-previousName
BI-7513 Added previousname query
2 parents 3674da1 + 6072e46 commit bf61547

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/services/search/dissolved-search/service.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,19 @@ export default class DissolvedSearchService {
1111
}
1212
const ALPHABETICAL_QUERY = "&search_type=alphabetical";
1313
const BEST_MATCH_QUERY = "&search_type=best-match";
14+
const PREVIOUSNAME_QUERY = "&search_type=previous-name-dissolved";
1415

1516
let dissolvedSearchURL = "/dissolved-search/companies?q=" + companyName;
1617

1718
if (searchType === "alphabetical") {
1819
dissolvedSearchURL += ALPHABETICAL_QUERY;
19-
} else {
20+
}
21+
if (searchType === "previousName") {
22+
dissolvedSearchURL += PREVIOUSNAME_QUERY;
23+
}
24+
if (searchType === "best-match") {
2025
dissolvedSearchURL += BEST_MATCH_QUERY;
21-
};
26+
}
2227

2328
const resp = await this.client.httpGet(dissolvedSearchURL, additionalHeaders);
2429

0 commit comments

Comments
 (0)