现在同一个模块内可以声明多个插件类了

This commit is contained in:
2025-11-06 20:38:43 +08:00
parent 4ad222cbc7
commit 14ce7e6e3f
2 changed files with 2 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ def ImportPlugins(app: FastAPI, plugin_dir:str = "Plugins") -> None:
plugin = plugin_class()
if plugin.is_enable_plugin() == False:
continue
router = plugin.execute(f"/{module_file.GetFullPath().replace(".py", '')}")
router = plugin.execute(f"/{module_file.GetFullPath().replace(".py", '')}/{class_name}")
if router:
app.include_router(router, prefix=f"/api", tags=[plugin.get_plugin_tag()])
except Exception as e: