Add React frontend and Sinbad2IA LLM integration.
Introduce a full Vite/React UI for exams, auth, materials, images, generation, and export. Adapt backend for Sinbad2IA chat API, bcrypt passwords, CORS on port 5173, and schema migrations.
This commit is contained in:
@@ -6,7 +6,7 @@ from fastapi import APIRouter, Depends, status
|
||||
from app.api.dependencies import get_exam_service, get_storage_quota_service
|
||||
from app.core.auth import get_current_user
|
||||
from app.models.user import User
|
||||
from app.schemas.exam import ExamTemplateCreate, ExamTemplateRead
|
||||
from app.schemas.exam import ExamTemplateCreate, ExamTemplateRead, QuestionRead
|
||||
from app.schemas.storage import TemplateStorageUsage
|
||||
from app.services.exam_service import ExamService
|
||||
from app.services.storage_quota import StorageQuotaService
|
||||
@@ -40,6 +40,15 @@ def get_template(
|
||||
return service.get_template(current_user.id, template_id)
|
||||
|
||||
|
||||
@router.get("/{template_id}/questions", response_model=list[QuestionRead])
|
||||
def list_template_questions(
|
||||
template_id: uuid.UUID,
|
||||
current_user: Annotated[User, Depends(get_current_user)],
|
||||
service: Annotated[ExamService, Depends(get_exam_service)],
|
||||
) -> list[QuestionRead]:
|
||||
return service.list_questions(current_user.id, template_id)
|
||||
|
||||
|
||||
@router.get("/{template_id}/storage", response_model=TemplateStorageUsage)
|
||||
def get_template_storage_usage(
|
||||
template_id: uuid.UUID,
|
||||
|
||||
Reference in New Issue
Block a user