- backend/ → lotto/ 디렉토리 이동 - docker-compose: lotto-backend→lotto, lotto-frontend→frontend - deploy scripts, nginx, agent-office config 네이밍 일괄 반영 - lotto/app/db.py에서 todos·blog_posts CREATE TABLE 제거 (personal로 이관 완료) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 lines
757 B
Python
25 lines
757 B
Python
"""큐레이터 입력 엔드포인트 — agent-office에서만 호출."""
|
|
from fastapi import APIRouter
|
|
from ..curator_helpers import collect_candidates, build_context
|
|
from .. import db
|
|
|
|
router = APIRouter(prefix="/api/lotto/curator")
|
|
|
|
|
|
@router.get("/candidates")
|
|
def candidates(n: int = 20):
|
|
ctx = build_context()
|
|
hot = set(ctx["hot_numbers"])
|
|
cold = set(ctx["cold_numbers"])
|
|
latest = db.get_latest_draw()
|
|
draw_no = (latest["drw_no"] + 1) if latest else 0
|
|
items = collect_candidates(n, hot, cold)
|
|
return {"draw_no": draw_no, "candidates": items}
|
|
|
|
|
|
@router.get("/context")
|
|
def context():
|
|
latest = db.get_latest_draw()
|
|
draw_no = (latest["drw_no"] + 1) if latest else 0
|
|
return {"draw_no": draw_no, **build_context()}
|