Updated resolved function to pass in route params