It was narrated from ‘Uwaimir bin Ashqar that he slaughtered before the prayer, and he mentioned that to the Prophet (ﷺ) who said:
“Repeat your sacrifice.”