Skip to content

Match abroad section ids with a non-zero 6th digit - #281

Merged
hkdobrev merged 1 commit into
mainfrom
fix/abroad-section-id-6th-digit
Oct 26, 2026
Merged

hkdobrev merged 1 commit into
mainfrom
fix/abroad-section-id-6th-digit

Conversation

@hkdobrev

Copy link
Copy Markdown
Member

CIK's 2026 abroad ids use 0, 1 or 2 in the 6th position (320012001, 320902332). SECTION_SEGMENT_BREAKDOWN only allowed 0 there, so GET /sections/:id, /results/:segment.json and the violations feed answered 404 for 512 of the 613 abroad sections. Today https://api.tibroish.bg/results/320902332.json is a 404 while /results/320010003.json works.

This is commit 3595594 from #272 on its own, so it can ship before the rest of #272.

  • src/sections/sections-pattern.ts: any digit in the 6th position of an abroad id
  • src/sections/sections-pattern.spec.ts: full abroad ids with 0/1/2 there, abroad region/country segments, a domestic id

npm test (39 passed) and eslint are clean.

CIK's 2026 abroad ids use 0, 1 or 2 in the 6th position (320012001,
320291132). SECTION_SEGMENT_BREAKDOWN only allowed 0 there, so
GET /sections/:id, /results/:segment.json and the violations feed failed
for 512 of the 613 abroad sections.
@hkdobrev
hkdobrev merged commit 595b30e into main Oct 26, 2026
1 check passed
@hkdobrev
hkdobrev deleted the fix/abroad-section-id-6th-digit branch October 26, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant