From abec9adfba6e142370822208180c73b9da8d359c Mon Sep 17 00:00:00 2001 From: William Woodson Date: Sat, 27 Feb 2016 21:12:18 -0600 Subject: [PATCH] Return an SMTP object via GET /campaigns --- models/campaign.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/campaign.go b/models/campaign.go index 4775276d..827d0d02 100644 --- a/models/campaign.go +++ b/models/campaign.go @@ -143,6 +143,10 @@ func GetCampaigns(uid int64) ([]Campaign, error) { if err != nil { Logger.Println(err) } + err = db.Table("SMTP").Where("id=?", cs[i].SMTPId).Find(&cs[i].SMTP).Error + if err != nil { + Logger.Println(err) + } } return cs, err }