现在同一个模块内可以声明多个插件类了
This commit is contained in:
Submodule Convention updated: 8121899d32...4ba5bfdfee
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user