Skip to content

Templates.update() appends HTML instead of replacing it #187

@justuskilianwolff

Description

@justuskilianwolff

When calling Templates.update() with an html field, the new HTML content is appended to the existing template HTML rather than replacing it.

create_params: Templates.CreateParams = {
    "name": "bools-light-dark",
    "from": mail_from,
    "reply_to": mail_reply_to,
    "subject": mail_subject,
    "html": mail_html,
    # "text": "",
}

template_response = resend.Templates.create(params=create_params)


update_params: Templates.UpdateParams = {
    "id": "bools-light-dark",
    **create_params,
}

template_response = resend.Templates.update(params=update_params)

Might be related to #186 ?

template_output_update.html

template_input.html

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions