Skip to content

Str 110 update bingo cell structure to have full question and short version#87

Merged
lnqminh3003 merged 6 commits intobackendfrom
STR-110-Update-Bingo-cell-structure-to-have-full-question-and-short-version
Mar 24, 2026
Merged

Str 110 update bingo cell structure to have full question and short version#87
lnqminh3003 merged 6 commits intobackendfrom
STR-110-Update-Bingo-cell-structure-to-have-full-question-and-short-version

Conversation

@rodolfo-gp
Copy link
Collaborator

@rodolfo-gp rodolfo-gp commented Mar 19, 2026

Summary

  • Updated bingo grid format from string[][] to BingoTile[][] ({ question, shortQuestion }) across the full stack:
    • AI generate endpoint now returns both full and short question versions
    • Bingo model schema updated to store { question, shortQuestion } objects
    • createBingo and updateBingo validation updated to accept the new format
  • Added null guard for Gemini API responses and bounds checking when combining grids
  • Fixed typos in the short questions prompt file
  • Updated API_REFERENCE.md and DATABASE_SCHEMA.md to reflect the new format
  • Removed unused Console import

Test plan

  • POST /api/bingo/generateBingo returns { question, shortQuestion } pairs
  • POST /api/bingo/generateBingo rejects unauthenticated requests (401)
  • POST /api/bingo/createBingo accepts BingoTile grid format (201)
  • POST /api/bingo/createBingo rejects old string[][] format (400)
  • GET /api/bingo/getBingo/:eventId returns BingoTile objects from DB
  • PUT /api/bingo/updateBingo accepts BingoTile format (200)
  • PUT /api/bingo/updateBingo rejects old format (400)
  • Updated grid persists correctly across create → get → update → get
  • TypeScript compiles with no errors

@rxmox rxmox changed the base branch from main to backend March 22, 2026 22:33
@rxmox rxmox force-pushed the STR-110-Update-Bingo-cell-structure-to-have-full-question-and-short-version branch 2 times, most recently from c9681ef to a4e8d44 Compare March 22, 2026 23:13
rodolfo-gp and others added 4 commits March 22, 2026 17:14
…format

- Update Bingo model to store { question, shortQuestion } objects instead of
  plain strings, matching the mobile BingoTile interface
- Update grid validation in createBingo and updateBingo to accept the new format
- Add null guard for Gemini response.text in both AI generation functions
- Add bounds checking in combine2DArrays to fallback to full question when
  short version is missing
- Fix typos in bingo_short_questions.txt prompt
- Remove unused Console import
@rxmox rxmox force-pushed the STR-110-Update-Bingo-cell-structure-to-have-full-question-and-short-version branch from a4e8d44 to e89c83a Compare March 22, 2026 23:14
- Update createBingo, getBingo, updateBingo docs with { question, shortQuestion } grid format
- Update error messages to match new validation
- Fix auth status on generate endpoint (is Protected, not Public)
- Update DATABASE_SCHEMA.md grid type from [[String]] to BingoTile objects
@rxmox rxmox requested a review from lnqminh3003 March 22, 2026 23:22
@rxmox rxmox assigned rodolfo-gp and unassigned lnqminh3003 and rxmox Mar 22, 2026
@lnqminh3003 lnqminh3003 merged commit 7f99939 into backend Mar 24, 2026
1 check 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.

3 participants