Skip to content

Commit

Permalink
Fix response content type in plaintext campaign previews. Closes #568
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Nov 5, 2021
1 parent d00a1a1 commit 0bd13fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/campaigns.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ func handlePreviewCampaign(c echo.Context) error {
app.i18n.Ts("templates.errorRendering", "error", err.Error()))
}

if camp.ContentType == models.CampaignContentTypePlain {
return c.String(http.StatusOK, string(msg.Body()))
}

return c.HTML(http.StatusOK, string(msg.Body()))
}

Expand Down

0 comments on commit 0bd13fe

Please sign in to comment.