mirror of https://github.com/gophish/gophish
Get send_by_date (#1720)
Get send_by_date field when query on GetCampaignSummary and GetCampaignSummariespull/1722/head
parent
da4e468c1f
commit
91d798336f
|
@ -324,7 +324,7 @@ func GetCampaignSummaries(uid int64) (CampaignSummaries, error) {
|
||||||
cs := []CampaignSummary{}
|
cs := []CampaignSummary{}
|
||||||
// Get the basic campaign information
|
// Get the basic campaign information
|
||||||
query := db.Table("campaigns").Where("user_id = ?", uid)
|
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
|
err := query.Scan(&cs).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
|
@ -347,7 +347,7 @@ func GetCampaignSummaries(uid int64) (CampaignSummaries, error) {
|
||||||
func GetCampaignSummary(id int64, uid int64) (CampaignSummary, error) {
|
func GetCampaignSummary(id int64, uid int64) (CampaignSummary, error) {
|
||||||
cs := CampaignSummary{}
|
cs := CampaignSummary{}
|
||||||
query := db.Table("campaigns").Where("user_id = ? AND id = ?", uid, id)
|
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
|
err := query.Scan(&cs).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
|
|
Loading…
Reference in New Issue