diff --git a/backend/main.py b/backend/main.py index e8564ce..3dda3f2 100644 --- a/backend/main.py +++ b/backend/main.py @@ -81,16 +81,10 @@ def _fix_template_parameters(): ).first() if template: - # Correct body parameters to match what send_wedding_invitation_bulk sends - correct_params = [ - "contact_name", - "groom_name", - "bride_name", - "venue", - "event_date", - "event_time", - "guest_link" - ] + # Correct body parameters to match the template structure: + # - Body has 1 placeholder {{1}} = contact_name + # - Button has 1 placeholder {{1}} = event_id (handled separately via button_param_key) + correct_params = ["contact_name"] current_params = json.loads(template.body_params or "[]") if current_params != correct_params: @@ -2056,16 +2050,10 @@ async def fix_templates(db: Session = Depends(get_db)): "message": "hina_invitation template not found in database" } - # Correct body parameters to match what send_wedding_invitation_bulk sends - correct_params = [ - "contact_name", - "groom_name", - "bride_name", - "venue", - "event_date", - "event_time", - "guest_link" - ] + # Correct body parameters to match the template structure: + # - Body has 1 placeholder {{1}} = contact_name + # - Button has 1 placeholder {{1}} = event_id (handled separately via button_param_key) + correct_params = ["contact_name"] old_params = template.body_params template.body_params = json.dumps(correct_params)