The Prophet ﷺ was brought a man who had drunk wine, and he had him flogged with two palm branches, around forty lashes. Abu Bakr did the same. When Umar came to power, he consulted the people, and Abdul-Rahman said, "The lightest of the prescribed punishments is eighty lashes." So Umar ordered that.
أن النبي ﷺ أتي برجل قد شرب الخمر، فجلده بجريدتين نحو أربعين قال: وفعله أبو بكر، فلما كان عمر استشار الناس… فقال عبد الرحمن: أخف الحدود ثمانين، فأمر به عمر.
Bukhari narrated it in the Hudud (6773) and Muslim in the Hudud (35:1706), both through the route of Shubah, who said, I heard Qatada narrating from Anas bin Malik, and he related it, with the wording belonging to Muslim. Bukhari did not mention Umar's consultation, nor Abdul-Rahman bin Awf's ruling. His wording was, "The Prophet ﷺ struck someone for drinking wine with palm branches and sandals, and Abu Bakr gave forty lashes."