jeanrauwers/mern-course-bootcamp

get all events returns empty array

Nishant-Pall opened this issue · 1 comments

I've been following the tutorial for quite a while now, and I encountered an issue where if I create a new event, it gets registered and I do get back a response, but if I hit the request at dashboard I get an empty array, I'm supposed to get back the event I registered for but I just get back [] in response. I tried debugging the getAllEvents method and found out that the result of await Event.find(query) returns an empty array, but it's not supposed to because I just created a new event, which I can still see if I hit the getEventById request.

Here's the repo.

Can you provide step-by-step (if possible with screenshots) on how to reproduce the issue?