Skip to content

Commit

Permalink
add new
Browse files Browse the repository at this point in the history
  • Loading branch information
idprm committed Oct 23, 2024
1 parent 6297297 commit 6e45e1f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions internal/handler/sms_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import (
"github.com/wiliehidayat87/rmqp"
)

const (
LIMIT_PER_DAY int = 1
)

type SMSHandler struct {
rmq rmqp.AMQP
rds *redis.Client
Expand Down Expand Up @@ -225,6 +229,7 @@ func (h *SMSHandler) SubAlerteCompetition(league *entity.League) {
&entity.SubscriptionFollowLeague{
SubscriptionID: sub.GetId(),
LeagueID: league.GetId(),
LimitPerDay: LIMIT_PER_DAY,
IsActive: true,
},
)
Expand All @@ -234,6 +239,7 @@ func (h *SMSHandler) SubAlerteCompetition(league *entity.League) {
&entity.SubscriptionFollowLeague{
SubscriptionID: sub.GetId(),
LeagueID: league.GetId(),
LimitPerDay: LIMIT_PER_DAY,
IsActive: true,
},
)
Expand Down Expand Up @@ -535,6 +541,7 @@ func (h *SMSHandler) SubAlerteEquipe(team *entity.Team) {
&entity.SubscriptionFollowTeam{
SubscriptionID: sub.GetId(),
TeamID: team.GetId(),
LimitPerDay: LIMIT_PER_DAY,
IsActive: true,
},
)
Expand All @@ -544,6 +551,7 @@ func (h *SMSHandler) SubAlerteEquipe(team *entity.Team) {
&entity.SubscriptionFollowTeam{
SubscriptionID: sub.GetId(),
TeamID: team.GetId(),
LimitPerDay: LIMIT_PER_DAY,
IsActive: true,
},
)
Expand Down Expand Up @@ -831,6 +839,7 @@ func (h *SMSHandler) AlreadySubAlerteCompetition(league *entity.League) {
&entity.SubscriptionFollowLeague{
SubscriptionID: sub.GetId(),
LeagueID: league.GetId(),
LimitPerDay: LIMIT_PER_DAY,
IsActive: true,
},
)
Expand Down Expand Up @@ -900,6 +909,7 @@ func (h *SMSHandler) AlreadySubAlerteEquipe(team *entity.Team) {
&entity.SubscriptionFollowTeam{
SubscriptionID: sub.GetId(),
TeamID: team.GetId(),
LimitPerDay: LIMIT_PER_DAY,
IsActive: true,
},
)
Expand Down

0 comments on commit 6e45e1f

Please sign in to comment.