Skip to content

feat: add lang filter to /api/sets#145

Merged
Pyronewbic merged 2 commits into
mainfrom
dev
May 25, 2026
Merged

feat: add lang filter to /api/sets#145
Pyronewbic merged 2 commits into
mainfrom
dev

Conversation

@Pyronewbic
Copy link
Copy Markdown
Owner

Summary

  • Cards tagged with lang field (en or jp) at index build time
  • Sets get lang field (en, jp, or both) based on card composition
  • /api/sets?lang=en returns sets with EN cards, ?lang=jp for JP, omit for all
  • Added CLAUDE.md rule: consider tests before each commit

Test plan

  • 311 unit tests pass (added lang field validation test)
  • 3 new API tests: lang field presence, ?lang=en filter, ?lang=jp filter
  • Verify /api/sets?lang=en excludes JP-only sets
  • Verify /api/sets?lang=jp excludes EN-only sets

Move eBay token + card DB init before app.listen so Cloud Run only
routes traffic after data is ready. Eliminates the 503 window on
cold start.
Tag cards with lang field at index build time. Sets get lang field
(en, jp, both) based on card composition. /api/sets?lang=en returns
sets with English cards, ?lang=jp for Japanese, no param for all.
@Pyronewbic Pyronewbic merged commit acd5ca6 into main May 25, 2026
8 checks passed
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