Wed 19 May 2021 8:04PM
Where is the index route for API::EventsController?
Edward L Platt
Public
Seen by 62
I am trying to understand how comments are filtered and sorted in the code. According to server output, /api/v1/events gets routed to API::EventsController#index, but I don't see that index method defined anywhere. Where is it defined?
Edward L Platt Mon 24 May 2021 12:37AM
Ah, it's in snorlax. Gotcha, thanks!
Robert Guthrie · Mon 24 May 2021 12:26AM
Hi @Edward L Platt, the EventsController#index method is not defined, so it inherits behaviour from the snorlax base definition, which looks like this:
and instantiate collection looks like this, which is where you can start to see it call methods from events controller.