mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-28 22:43:51 +08:00
feat: 新增智控台管理websocket服务器端【配置拉取】和【重启】
This commit is contained in:
@@ -273,9 +273,10 @@ class ConnectionHandler:
|
||||
await self.websocket.send(
|
||||
json.dumps(
|
||||
{
|
||||
"type": "server_response",
|
||||
"type": "server",
|
||||
"status": "success",
|
||||
"message": "服务器重启中...",
|
||||
"content": {'action': "restart"}
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -302,9 +303,10 @@ class ConnectionHandler:
|
||||
await self.websocket.send(
|
||||
json.dumps(
|
||||
{
|
||||
"type": "server_response",
|
||||
"type": "server",
|
||||
"status": "error",
|
||||
"message": f"Restart failed: {str(e)}",
|
||||
'content': {'action': "restart"}
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user