This is a helper function to assign controller actions to routes in express