Skip to content

Commit c88ece2

Browse files
committed
Change condition in Campaign from and to
1 parent a146fd3 commit c88ece2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Services/Marketing/Marketing.API/Controllers/CampaignsController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ public async Task<IActionResult> GetCampaignsByUserId(Guid userId)
141141
var userCampaignList = await _context.Rules
142142
.OfType<UserLocationRule>()
143143
.Include(c => c.Campaign)
144-
.Where(c => c.Campaign.From >= DateTime.Now
145-
&& c.Campaign.To <= DateTime.Now
144+
.Where(c => c.Campaign.From <= DateTime.Now
145+
&& c.Campaign.To >= DateTime.Now
146146
&& c.LocationId == userLocation.LocationId)
147147
.Select(c => c.Campaign)
148148
.ToListAsync();

0 commit comments

Comments
 (0)