__init__.py 966 B

1234567891011121314151617181920212223242526
  1. # -*- coding: utf-8 -*-
  2. from fastapi import APIRouter
  3. from schemas.app.paper import QuestionList, QuestionAnswerDetail
  4. from .question import get_paper_questions, get_question_answer
  5. router = APIRouter(tags=["作业/考试中心-教师学生端"])
  6. router.add_api_route("/papers/{pid}/questions",
  7. get_paper_questions,
  8. methods=["get"],
  9. response_model=QuestionList,
  10. response_model_exclude_none=True,
  11. summary="作业/考试中心 - 试卷试题列表")
  12. router.add_api_route("/papers/{pid}/questions/{qno}-{sqno}/answer",
  13. get_question_answer,
  14. methods=["get"],
  15. response_model=QuestionAnswerDetail,
  16. response_model_exclude_none=True,
  17. response_model_by_alias=True,
  18. summary="作业/考试中心 - 批阅 - 查看答案")
  19. __all__ = [router]