It depends on what you want to achieve, both are acceptable, but sending requests from endpoints is more idiomatic if you're making updates to DOM etc. based on sessions. In particular, it allows you to SSR and serve HTML with filled in data rather than waiting on the client with a blank screen.
It also subjectively for me feels cleaner separating fetching/model logic from other ui/business logic.