fix: web 命令端点 execute_command → process_command (方法名错误)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -97,7 +97,7 @@ commands:
|
|||||||
permissions:
|
permissions:
|
||||||
- framework.command.test
|
- framework.command.test
|
||||||
source: internal
|
source: internal
|
||||||
last_updated: 11814.024966534
|
last_updated: 12019.862122705
|
||||||
plugin_commands:
|
plugin_commands:
|
||||||
example_plugin:
|
example_plugin:
|
||||||
echo: *id001
|
echo: *id001
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
http_port: 4200
|
http_port: 4200
|
||||||
last_updated: 11814.04652419
|
last_updated: 12019.877017393
|
||||||
plugin_routes:
|
plugin_routes:
|
||||||
example_plugin:
|
example_plugin:
|
||||||
- methods:
|
- methods:
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ async def exec_cmd(req):
|
|||||||
if not cs:
|
if not cs:
|
||||||
return web.json_response({"error": "Missing"}, status=503)
|
return web.json_response({"error": "Missing"}, status=503)
|
||||||
try:
|
try:
|
||||||
res = await cs.execute_command(raw)
|
res = await cs.process_command(raw, source="web")
|
||||||
return web.json_response({"success": True, "output": str(res)})
|
return web.json_response({"success": True, "output": str(res)})
|
||||||
except Exception:
|
except Exception:
|
||||||
return web.json_response({"success": False, "error": "命令执行失败"})
|
return web.json_response({"success": False, "error": "命令执行失败"})
|
||||||
|
|||||||
Reference in New Issue
Block a user