Skip to content

Commit

Permalink
#update: remove after time
Browse files Browse the repository at this point in the history
  • Loading branch information
tdatIT committed Jun 24, 2024
1 parent 7353727 commit 716f77c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/service/notifyService/notification_us_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (n notificationService) SendCampaignInternalService(ctx context.Context, re
return nil, errorUtils.ErrParseDatetimeParameters
}

if schedule.After(time.Now().Add(15 * time.Minute)) {
if schedule.After(time.Now()) {
noti := notication.NewNotification()

noti.OwnerID = "all"
Expand Down Expand Up @@ -256,7 +256,7 @@ func (n notificationService) AdminCreateCampaign(ctx context.Context, req *dto.A
return nil, errorUtils.ErrParseDatetimeParameters
}

if schedule.After(time.Now().Add(15 * time.Minute)) {
if schedule.After(time.Now()) {
noti := notication.NewNotification()
noti.OwnerID = "all"
noti.CampaignTopic = req.CampaignTopic
Expand Down
4 changes: 4 additions & 0 deletions internal/service/notifyService/notification_us_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import (
"time"
)

const (
_15_MIN = 15 * time.Minute
)

func (n notificationService) sendCampaignToAllDevice(ctx context.Context, noti *notication.Notification) error {

scheduleTime, err := noti.ParseScheduleToTime()
Expand Down

0 comments on commit 716f77c

Please sign in to comment.