ZHIWEI666 commited on
Commit
ca36b9a
·
verified ·
1 Parent(s): b71f16d

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -31,8 +31,6 @@ from router_users_social import router as users_social_router
31
  # 其他业务模块
32
  # ==========================================
33
  from router_items import router as items_router # 📦 内容管理(工具/应用/推荐)
34
- from router_posts import router as posts_router # 💬 讨论区
35
- from router_tasks import router as tasks_router # 📝 任务榜
36
  from router_comments import router as comments_router # 💬 评论系统
37
  from router_messages import router as messages_router # ✉️ 私信系统
38
  from router_wallet import router as wallet_router # 💰 钱包/提现
@@ -52,7 +50,7 @@ def health_check():
52
  # ==========================================
53
  # 作用:初始化数据库 + 启动定时版本检测后台任务
54
  @app.on_event("startup")
55
- def on_startup():
56
  # 初始化 SQL 数据库
57
  init_sql_db()
58
  print("关系型数据库加载完毕,金融表同步完成。")
@@ -78,8 +76,6 @@ app.include_router(users_social_router) # 🤝 关注/隐私
78
 
79
  # 其他业务模块
80
  app.include_router(items_router) # 📦 内容管理
81
- app.include_router(posts_router) # 💬 讨论区
82
- app.include_router(tasks_router) # 📝 任务榜
83
  app.include_router(comments_router) # 💬 评论系统
84
  app.include_router(messages_router) # ✉️ 私信系统
85
  app.include_router(wallet_router) # 💰 钱包/提现
 
31
  # 其他业务模块
32
  # ==========================================
33
  from router_items import router as items_router # 📦 内容管理(工具/应用/推荐)
 
 
34
  from router_comments import router as comments_router # 💬 评论系统
35
  from router_messages import router as messages_router # ✉️ 私信系统
36
  from router_wallet import router as wallet_router # 💰 钱包/提现
 
50
  # ==========================================
51
  # 作用:初始化数据库 + 启动定时版本检测后台任务
52
  @app.on_event("startup")
53
+ async def on_startup():
54
  # 初始化 SQL 数据库
55
  init_sql_db()
56
  print("关系型数据库加载完毕,金融表同步完成。")
 
76
 
77
  # 其他业务模块
78
  app.include_router(items_router) # 📦 内容管理
 
 
79
  app.include_router(comments_router) # 💬 评论系统
80
  app.include_router(messages_router) # ✉️ 私信系统
81
  app.include_router(wallet_router) # 💰 钱包/提现