Load all 12 groups' schedule (72 matches) + Naver-style schedule UI
Backend
- teams_data.py: 48-team data (ko/short/en), TLA→FIFA code remap
- config: schedule_all_groups, featured_group("A") — only featured group is votable/AI-predicted
- schedule_fetch: fetch all GROUP_STAGE matches from football-data, KST serialize
- schedule_sync: ingest all groups, unordered-pair match to avoid Group A dup, derive votable from group
- worker: AI generation limited to featured group; settle still covers all
- domain/predictions: is_votable() + MatchOut.votable; reject non-votable submits with 403 MATCH_NOT_VOTABLE
Frontend
- types: Match.votable
- ScheduleBoard: Naver-style date/group tabs + chips; votable(A) cards link to detail with AI split + 참여수, others display-only
Verified: 72 matches (12×6), Group A not duplicated, votable A=6/others=66; A submit 200, B submit 403
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c9244bc42d
commit
deb1332440
10 files changed
+366
-99
No files matched your search
@@ -7,7 +7,7 @@ from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from sqlalchemy.orm import selectinload
|
||||
|
||||
from ..database import get_db
|
||||
from ..domain import compute_phase, crowd_out, is_open_for_voting
|
||||
from ..domain import compute_phase, crowd_out, is_open_for_voting, is_votable
|
||||
from ..models import AIPrediction, CrowdStats, Match, UserPrediction
|
||||
from ..scoring import outcome_of
|
||||
from ..schemas import SubmitPredictionIn, SubmitPredictionOut
|
||||
@@ -49,6 +49,8 @@ async def submit_prediction(
|
||||
).scalars().first()
|
||||
if not match:
|
||||
raise HTTPException(status_code=404, detail="MATCH_NOT_FOUND")
|
||||
if not is_votable(match):
|
||||
raise HTTPException(status_code=403, detail="MATCH_NOT_VOTABLE")
|
||||
if not is_open_for_voting(match):
|
||||
# 종료 사유 정밀 구분: 종료 / 경기중 / 투표종료 / 오픈전
|
||||
phase = compute_phase(match)
|
||||
|
||||
Reference in new issue
Block a user