Files
PolyWeather/web/routes.py
2569718930@qq.com 37494a7192 @
将 web/routes.py 拆分为模块化 router + service 架构

    - 新增 web/app_factory.py 集中注册 7 个域名 router
    - 新增 web/routers/ 薄壳路由层(auth/city/system/scan/ops/payments/analytics)
    - 新增 web/services/ 业务函数下沉(每域独立 service 文件)
    - web/routes.py 缩减为 city_runtime 的兼容重导出 facade
    - analysis_service.py/app.py 适配新入口并清理冗余导入

    Scope-risk: LOW — 全量 170 测试通过,router 注册顺序与原路由一致
    Tested: python -m pytest -q (170 passed), ruff check . (All checks passed)
@
2026-05-14 20:01:26 +08:00

15 lines
546 B
Python

"""Compatibility facade for legacy ``web.routes`` imports.
Endpoint handlers now live under ``web.routers``. The remaining cache/history
helpers are implemented in ``web.services.city_runtime`` and re-exported here so
existing tests, monkeypatches, and transitional routers can keep importing
``web.routes`` while the backend is modularized incrementally.
"""
from web.services import city_runtime as _city_runtime
for _name in _city_runtime.__all__:
globals()[_name] = getattr(_city_runtime, _name)
__all__ = list(_city_runtime.__all__)