fix: lastStartTime instead of firstStartTime

This commit is contained in:
Samuel Tariku 2025-09-17 21:18:19 +03:00
parent 3bcd880e90
commit 6ad31550ac
2 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ func (s *ServiceImpl) FetchNonLiveOdds(ctx context.Context) error {
func (s *ServiceImpl) ProcessBet365Odds(ctx context.Context) error { func (s *ServiceImpl) ProcessBet365Odds(ctx context.Context) error {
eventIDs, _, err := s.eventSvc.GetAllEvents(ctx, domain.EventFilter{ eventIDs, _, err := s.eventSvc.GetAllEvents(ctx, domain.EventFilter{
FirstStartTime: domain.ValidTime{ LastStartTime: domain.ValidTime{
Value: time.Now(), Value: time.Now(),
Valid: true, Valid: true,
}, },

View File

@ -228,7 +228,7 @@ func (s *Service) FetchB365ResultAndUpdateBets(ctx context.Context) error {
// TODO: Optimize this because there could be many bet outcomes for the same odd // TODO: Optimize this because there could be many bet outcomes for the same odd
// Take market id and match result as param and update all the bet outcomes at the same time // Take market id and match result as param and update all the bet outcomes at the same time
events, _, err := s.repo.GetAllEvents(ctx, domain.EventFilter{ events, _, err := s.repo.GetAllEvents(ctx, domain.EventFilter{
FirstStartTime: domain.ValidTime{ LastStartTime: domain.ValidTime{
Value: time.Now(), Value: time.Now(),
Valid: true, Valid: true,
}, },
@ -725,7 +725,7 @@ func (s *Service) SendAdminResultStatusErrorNotification(
func (s *Service) CheckAndUpdateExpiredB365Events(ctx context.Context) (int64, error) { func (s *Service) CheckAndUpdateExpiredB365Events(ctx context.Context) (int64, error) {
events, _, err := s.repo.GetAllEvents(ctx, domain.EventFilter{ events, _, err := s.repo.GetAllEvents(ctx, domain.EventFilter{
FirstStartTime: domain.ValidTime{ LastStartTime: domain.ValidTime{
Value: time.Now(), Value: time.Now(),
Valid: true, Valid: true,
}, },