Skip to content

Commit

Permalink
Support both long and short country codes
Browse files Browse the repository at this point in the history
  • Loading branch information
hkdobrev committed Oct 29, 2023
1 parent cc9246f commit 7411279
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sections/entities/towns.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class TownsRepository {
throw new Error('Cannot filter towns by just election region!')
}

if (countryCode === '00') {
if (countryCode === '00' || countryCode === '000') {
countryCode = COUNTRY_DOMESTIC
}

Expand Down
2 changes: 1 addition & 1 deletion src/sections/sections.constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const ELECTION_REGION_ABROAD = '32'
export const COUNTRY_DOMESTIC = '000'
export const COUNTRY_DOMESTIC = '00'
export const CITY_REGION_NONE = '00'
export const MUNICIPALITIES_HIDDEN = ['2346', '2446', '2546', '1622']
export const MUNICIPALITIES_MULTI_REGION = ['2346', '2446', '2546']

0 comments on commit 7411279

Please sign in to comment.