feat:插件API支持bear认证

This commit is contained in:
jxxghp
2025-05-07 13:26:42 +08:00
parent 4dc2c18075
commit 0cdea3318c
3 changed files with 10 additions and 3 deletions
+2
View File
@@ -475,6 +475,8 @@ class PluginManager(metaclass=Singleton):
apis = plugin.get_api() or []
for api in apis:
api["path"] = f"/{plugin_id}{api['path']}"
if not api.get("auth"):
api["auth"] = "apikey"
ret_apis.extend(apis)
except Exception as e:
logger.error(f"获取插件 {plugin_id} API出错:{str(e)}")