From fdfe998d99f5f77a01ea7b9fc52aa64f943fa451 Mon Sep 17 00:00:00 2001 From: H Vs Date: Mon, 28 Apr 2025 10:57:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/endpoints/config_endpoint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/endpoints/config_endpoint.py b/app/endpoints/config_endpoint.py index 0e8b93b..4d8c033 100644 --- a/app/endpoints/config_endpoint.py +++ b/app/endpoints/config_endpoint.py @@ -83,8 +83,8 @@ async def save_config(request: Request, body: SaveConfigRequest): except ValidationError as e: return {'code': 407, 'message': e.errors().__str__()} - await request.app.state.gewe_service.save_wxchat_config_async(wxid, data) - return {'wxid': wxid, 'config': data} + await request.app.state.gewe_service.save_wxchat_config_async(wxid, validated_config.model_dump()) + return {'wxid': wxid, 'config': validated_config.model_dump()} @config_router.post("/global/getconfig",response_model=None)