func UpdateWarningSent(entity *models.Warning, db gorp.SqlExecutor) bool { entity.Sent = true entity.Last_modified_date = time.Now().String() _, err := db.Update(entity) checkErr(err, "ERROR UpdateWarningSent ERROR") return err == nil }
func clearReturn(entity *models.Warning) { entity.Message = "" entity.Ip = "" entity.Browser = "" entity.Operating_system = "" entity.Device = "" entity.Raw = "" entity.Created_by = "" entity.Last_modified_by = "" entity.Last_modified_date = "" entity.WarnResp.Reply_to = "" entity.WarnResp.Ip = "" entity.WarnResp.Browser = "" entity.WarnResp.Operating_system = "" entity.WarnResp.Device = "" entity.WarnResp.Raw = "" if entity.WarnResp.Reply_date == "0000-00-00 00:00:00" { entity.WarnResp.Reply_date = "" } if entity.WarnResp.Response_read == "0000-00-00 00:00:00" { entity.WarnResp.Response_read = "" } }