mirror of
https://github.com/knadh/listmonk.git
synced 2025-11-13 03:02:14 +08:00
Fix broken test mail due to missing tpl param.
This commit is contained in:
parent
35ac1ccdf5
commit
c8c135e31f
1 changed files with 2 additions and 1 deletions
|
|
@ -543,6 +543,7 @@ func handleTestCampaign(c echo.Context) error {
|
||||||
var (
|
var (
|
||||||
app = c.Get("app").(*App)
|
app = c.Get("app").(*App)
|
||||||
campID, _ = strconv.Atoi(c.Param("id"))
|
campID, _ = strconv.Atoi(c.Param("id"))
|
||||||
|
tplID, _ = strconv.Atoi(c.FormValue("template_id"))
|
||||||
req campaignReq
|
req campaignReq
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -581,7 +582,7 @@ func handleTestCampaign(c echo.Context) error {
|
||||||
|
|
||||||
// The campaign.
|
// The campaign.
|
||||||
var camp models.Campaign
|
var camp models.Campaign
|
||||||
if err := app.queries.GetCampaignForPreview.Get(&camp, campID); err != nil {
|
if err := app.queries.GetCampaignForPreview.Get(&camp, campID, tplID); err != nil {
|
||||||
if err == sql.ErrNoRows {
|
if err == sql.ErrNoRows {
|
||||||
return echo.NewHTTPError(http.StatusBadRequest,
|
return echo.NewHTTPError(http.StatusBadRequest,
|
||||||
app.i18n.Ts("globals.messages.notFound",
|
app.i18n.Ts("globals.messages.notFound",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue