fix api
This commit is contained in:
@ -10,7 +10,7 @@ from app.db.userauth import get_current_active_user
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/", response_model=schemas.Response)
|
||||
@router.get("/", summary="运行插件方法", response_model=schemas.Response)
|
||||
@router.post("/")
|
||||
async def run_plugin_method(plugin_id: str, method: str,
|
||||
_: User = Depends(get_current_active_user),
|
||||
@ -23,3 +23,7 @@ async def run_plugin_method(plugin_id: str, method: str,
|
||||
method=method,
|
||||
*args,
|
||||
**kwargs)
|
||||
|
||||
# 注册插件API
|
||||
for api in PluginManager().get_plugin_apis():
|
||||
router.add_api_route(**api)
|
||||
|
Reference in New Issue
Block a user