you got your just desserts

You got your just desserts is an idiom which is referring to someone getting exactly what they deserved. This may be used in reference to something good or bad, such as a reward for something good, or punishment for something bad. It is most often used for getting what you deserved such as paying the consequences, but the origin of the phrase refers to dessert as being an award for good behavior.