summaryrefslogtreecommitdiff
path: root/Logics/RafflePlayLogic.cs
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2022-11-29 16:36:28 -0600
committerHombreLaser <sebastian-440@live.com>2022-11-29 16:36:28 -0600
commit1dee2f9b9ef0fc35bcbcea01b2a8477bda51063f (patch)
tree63dfb98f221cd0b53c4704da8eb982d1579696b2 /Logics/RafflePlayLogic.cs
parent342f482206f875e0466216ec176eb341dd506d9e (diff)
Añadido query de nombremain
Diffstat (limited to 'Logics/RafflePlayLogic.cs')
-rw-r--r--Logics/RafflePlayLogic.cs6
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;