“Do not carry out the legal punishment in the mosque.”
Sunan Ibn Majah Book 20, Hadith 67