Fix the code to use the endpoint we've defined