Skip to content

Commit

Permalink
add filter for activities to exclude used ones
Browse files Browse the repository at this point in the history
  • Loading branch information
matt1484 committed Sep 18, 2019
1 parent 3ad10f3 commit bf851d3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vip.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func (v VipCodeMap) Add(codeType, code string) {
type VipActivity struct {
Title string `json:"title"`
Link string `json:"link_href"`
IsActive bool `json:"has_reached_freq_cap"`
}

type VipConfig struct {
Expand Down Expand Up @@ -277,7 +276,7 @@ func (client *Bl3Client) GetVipActivities() ([]VipActivity, error) {
if err != nil {
return activities, errors.New("failed to get activities")
}
responseJson.From("model_data.activity.activities").Select("title", "link_href", "user_activity_status.has_reached_freq_cap").Out(&activities)
responseJson.From("model_data.activity.activities").Where("user_activity_status.has_reached_freq_cap", "=", false).Select("title", "link_href").Out(&activities)

return activities, nil
}
Expand Down

0 comments on commit bf851d3

Please sign in to comment.