diff options
Diffstat (limited to 'Logics/RafflePlayLogic.cs')
-rw-r--r-- | Logics/RafflePlayLogic.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Logics/RafflePlayLogic.cs b/Logics/RafflePlayLogic.cs index 74591b6..06cf0c5 100644 --- a/Logics/RafflePlayLogic.cs +++ b/Logics/RafflePlayLogic.cs @@ -37,6 +37,12 @@ namespace BackendPIA.Logics { return false; } + if(raffle.Prizes.Count() < raffle.Winners) { + ErrorMessage = $"Can't play: not enough prizes."; + + return false; + } + Winners = await _game_service.GetWinners(_raffle_id); return true; |