mirror of
				https://github.com/knadh/listmonk.git
				synced 2025-10-31 19:15:56 +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 ( | ||||
| 		app       = c.Get("app").(*App) | ||||
| 		campID, _ = strconv.Atoi(c.Param("id")) | ||||
| 		tplID, _  = strconv.Atoi(c.FormValue("template_id")) | ||||
| 		req       campaignReq | ||||
| 	) | ||||
| 
 | ||||
|  | @ -581,7 +582,7 @@ func handleTestCampaign(c echo.Context) error { | |||
| 
 | ||||
| 	// The 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 { | ||||
| 			return echo.NewHTTPError(http.StatusBadRequest, | ||||
| 				app.i18n.Ts("globals.messages.notFound", | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue