From ea508bebc83ad7d9c95d2ab8151ab784b4be557d Mon Sep 17 00:00:00 2001 From: Alexandertp Date: Wed, 20 Dec 2023 16:40:18 +0100 Subject: [PATCH] Fix parent infinite dispense --- backend/Controllers/DispenserController.cs | 2 +- frontend/src/views/HomeView.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/Controllers/DispenserController.cs b/backend/Controllers/DispenserController.cs index d9ed3db..b16293c 100644 --- a/backend/Controllers/DispenserController.cs +++ b/backend/Controllers/DispenserController.cs @@ -17,7 +17,7 @@ public class DispenserController : ControllerBase if (user == null) { return BadRequest("Invalid session token"); } - if (user.Dispenses == 0) { + if (user.Dispenses == 0 && !user.IsParent) { Console.WriteLine("Poorfag"); return BadRequest("Not enough dispenses on account"); } diff --git a/frontend/src/views/HomeView.vue b/frontend/src/views/HomeView.vue index c2fe04a..f409129 100644 --- a/frontend/src/views/HomeView.vue +++ b/frontend/src/views/HomeView.vue @@ -29,9 +29,9 @@ async function saveChild(child) {