I have a requirement,
When clicking the close I need to destroy the user session. For this, I have created an ajax call to destroy the session.
For calling controller with the Sitecore context, I have created a custom route to update the controller action method.
But when I call this method the injected method calls automatically(In the controller that I injected and throws a null exception)
Custom route class:
The error that I'm facing:
The injected method from the controller: