From 91d798336f3849a3f3dd7acf62e5cc47ba4d7fdc Mon Sep 17 00:00:00 2001 From: JoseW3b Date: Thu, 16 Jan 2020 05:02:19 +0100 Subject: [PATCH] Get send_by_date (#1720) Get send_by_date field when query on GetCampaignSummary and GetCampaignSummaries --- models/campaign.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/campaign.go b/models/campaign.go index 3ce313fb..4224edc1 100644 --- a/models/campaign.go +++ b/models/campaign.go @@ -324,7 +324,7 @@ func GetCampaignSummaries(uid int64) (CampaignSummaries, error) { cs := []CampaignSummary{} // Get the basic campaign information query := db.Table("campaigns").Where("user_id = ?", uid) - query = query.Select("id, name, created_date, launch_date, completed_date, status") + query = query.Select("id, name, created_date, launch_date, send_by_date, completed_date, status") err := query.Scan(&cs).Error if err != nil { log.Error(err) @@ -347,7 +347,7 @@ func GetCampaignSummaries(uid int64) (CampaignSummaries, error) { func GetCampaignSummary(id int64, uid int64) (CampaignSummary, error) { cs := CampaignSummary{} query := db.Table("campaigns").Where("user_id = ? AND id = ?", uid, id) - query = query.Select("id, name, created_date, launch_date, completed_date, status") + query = query.Select("id, name, created_date, launch_date, send_by_date, completed_date, status") err := query.Scan(&cs).Error if err != nil { log.Error(err)