Files
mctf/dark-tariff/backend/app/api/routes/chat.py
T
TakuyaYagam1 13f936bee9 chore: import MCTF services
- Added all seven issued service trees without omissions.
- Preserved the supplied runtime configuration, binaries, and assets.
2026-11-29 12:25:29 +03:00

25 lines
806 B
Python
Executable File

from uuid import UUID
from fastapi import APIRouter
from backend.app.db import operations
from backend.app.api.schemas import CheckStart, CheckCommit, CheckAnswer
router = APIRouter(prefix="/api/chat", tags=["chat"])
@router.get("/greeting")
async def greeting():
return await operations.chat_greeting()
@router.post("/checks", status_code=201)
async def check_start(body: CheckStart):
return await operations.check_start(body.reading_id)
@router.post("/checks/{check_id}/commit")
async def check_commit(check_id: UUID, body: CheckCommit):
return await operations.check_commit(check_id, body.round, body.values)
@router.post("/checks/{check_id}/answer")
async def check_answer(check_id: UUID, body: CheckAnswer):
return await operations.check_answer(check_id, body.round, body.data)