Change the route action to a function.