'commit'
This commit is contained in:
@@ -5,15 +5,11 @@ from Model.RenkouModel import RenkouModel
|
||||
# 创建APIRouter实例
|
||||
router = APIRouter(prefix="/bigscreen", tags=["大屏展示"])
|
||||
|
||||
# 定义路由
|
||||
# 默认的根路由
|
||||
@router.get("/")
|
||||
async def root():
|
||||
return {"message": "Welcome to YunNan Education World!"}
|
||||
|
||||
@router.get("/chart/bar")
|
||||
async def get_bar_chart_config():
|
||||
return RenkouModel.generate_population_chart_config()
|
||||
|
||||
@router.get("/population/chart/{year}")
|
||||
async def get_population_chart_config(year: str = "2024"):
|
||||
return RenkouModel.generate_population_chart_config(year)
|
||||
@@ -22,6 +18,3 @@ async def get_population_chart_config(year: str = "2024"):
|
||||
async def get_urbanization_rate_chart_config():
|
||||
return RenkouModel.generate_urbanization_rate_chart_config()
|
||||
|
||||
@router.get("/population/data")
|
||||
async def get_population_data():
|
||||
return {"data": RenkouModel.load_population_data()}
|
||||
|
Reference in New Issue
Block a user