Implemented the endpoint for adding new todos