Graham Potter admitted West Ham rode their luck as they secured a 3-2 victory over Fulham in his first home match in charge.