Fix response content type in plaintext campaign previews. Closes #568

This commit is contained in:
Kailash Nadh 2021-11-05 09:21:39 +05:30
parent d00a1a1e84
commit 0bd13fe541

View file

@ -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()))
}