12 lines
347 B
Python
12 lines
347 B
Python
"""
|
||
仪表板API(重定向到stats)
|
||
"""
|
||
from fastapi import APIRouter
|
||
from api.routes.stats import get_dashboard_data
|
||
|
||
router = APIRouter()
|
||
|
||
# 使用stats模块的dashboard函数(同时支持有斜杠和无斜杠)
|
||
router.add_api_route("", get_dashboard_data, methods=["GET"])
|
||
router.add_api_route("/", get_dashboard_data, methods=["GET"])
|