fix: add get_module_dbname to plugin for portal unified DB

This commit is contained in:
Hermes Agent 2026-06-16 14:36:08 +08:00
parent ab3e3b3f64
commit b1319a9f1e

View File

@ -81,11 +81,17 @@ async def get_latest_news(limit=3):
return []
def get_module_dbname(module_name):
"""Portal 所有模块共用 ocai_cms 数据库"""
return 'ocai_cms'
def load_cms():
g = ServerEnv()
g.get_site_config = get_site_config
g.get_published_content = get_published_content
g.get_latest_news = get_latest_news
g.get_module_dbname = get_module_dbname
load_cms()