Fix welcome text update payload mapping

This commit is contained in:
Egor
2025-11-25 01:53:01 +03:00
parent a11d37ef96
commit 80752c3004

View File

@@ -104,6 +104,8 @@ async def update_welcome_text_endpoint(
raise HTTPException(status.HTTP_404_NOT_FOUND, "Welcome text not found")
update_payload = payload.dict(exclude_unset=True)
if "text" in update_payload:
update_payload["text_content"] = update_payload.pop("text")
updated = await update_welcome_text(db, record, **update_payload)
return _serialize(updated)