Skip to content

Commit

Permalink
updated logic in getallaevenst
Browse files Browse the repository at this point in the history
it wont return events where status is receted canceled and panding aproval
  • Loading branch information
bilimig committed Jun 23, 2024
1 parent 51af7a5 commit f0458a3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Server/ReasnAPI/ReasnAPI/Services/EventService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,13 @@ public List<string> GetEventImages(string slug)

public IEnumerable<EventResponse> GetAllEvents()
{
var events = context.Events.Include(e => e.Parameters).Include(e => e.Tags).Include(e => e.Address).Include(e => e.Organizer).Where(e => e.Status != EventStatus.PendingApproval).ToList();
var events = context.Events.Include(e => e.Parameters)
.Include(e => e.Tags)
.Include(e => e.Address)
.Include(e => e.Organizer)
.Where(e => e.Status != EventStatus.PendingApproval &&
e.Status != EventStatus.Cancelled &&
e.Status != EventStatus.Rejected).ToList();
var eventsResponses = new List<EventResponse>();
foreach (var thisEvent in events )
{
Expand Down

0 comments on commit f0458a3

Please sign in to comment.