'commit'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from fastapi import APIRouter
|
||||
from fastapi import APIRouter, Query
|
||||
|
||||
from Model.RuYuanZaiYuanCountModel import RuYuanZaiYuanModel
|
||||
|
||||
@@ -10,12 +10,19 @@ router = APIRouter(prefix="/RuYuanZaiYuan", tags=["大屏展示"])
|
||||
async def root():
|
||||
return {"message": "Welcome to YunNan Education World!"}
|
||||
|
||||
@router.get("/school/preschool/chart")
|
||||
async def get_preschool_education_chart_config():
|
||||
return RuYuanZaiYuanModel.generate_preschool_education_config()
|
||||
@router.get("/school/chart")
|
||||
async def get_education_chart_config(
|
||||
education_stage: str = Query(default="preschool", pattern="^(preschool|primary|junior|senior)$",
|
||||
description="教育阶段: preschool(学前), primary(小学), junior(初中), senior(高中)")
|
||||
):
|
||||
return RuYuanZaiYuanModel.generate_preschool_education_config(education_stage)
|
||||
|
||||
@router.get("/school/inschool/chart")
|
||||
async def get_in_school_chart_config(
|
||||
education_stage: str = Query(default="preschool", pattern="^(preschool|primary|junior|senior)$",
|
||||
description="教育阶段: preschool(学前), primary(小学), junior(初中), senior(高中)")
|
||||
):
|
||||
return RuYuanZaiYuanModel.generate_in_school_education_config(education_stage)
|
||||
|
||||
@router.get("/school/preschool/inschool/chart")
|
||||
async def get_preschool_in_school_chart_config():
|
||||
return RuYuanZaiYuanModel.generate_in_school_education_config()
|
||||
|
||||
|
||||
|
Binary file not shown.
Reference in New Issue
Block a user