Browse Source

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

Kailash Nadh 3 năm trước cách đây
mục cha
commit
0bd13fe541
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      cmd/campaigns.go

+ 4 - 0
cmd/campaigns.go

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