When you say that someone has got his just desserts, what you mean is that the individual got what he deserved. The punishment he received was well deserved.
” In most movies, the villain gets his just desserts in the end.” * “I am really glad that India lost. They got their just desserts. The players were overconfident.”