去除插件调用地址的.py文件名后缀
This commit is contained in:
@@ -123,7 +123,7 @@ def ImportPlugins(app: FastAPI, plugin_dir:str = "Plugins") -> None:
|
|||||||
plugin = plugin_class()
|
plugin = plugin_class()
|
||||||
if plugin.is_enable_plugin() == False:
|
if plugin.is_enable_plugin() == False:
|
||||||
continue
|
continue
|
||||||
router = plugin.execute(f"/{module_file}")
|
router = plugin.execute(f"/{module_file.GetFullPath().replace(".py", '')}")
|
||||||
if router:
|
if router:
|
||||||
app.include_router(router, prefix=f"/api", tags=[plugin.get_plugin_tag()])
|
app.include_router(router, prefix=f"/api", tags=[plugin.get_plugin_tag()])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user