From d84d65f28fc88a9f7d4fb6fde4df19f244635444 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sun, 24 Jan 2021 20:49:11 -0500 Subject: [PATCH] [O] Check pin count when updating pins as well --- ProjectClock/AccountViewController.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ProjectClock/AccountViewController.swift b/ProjectClock/AccountViewController.swift index 473848d..2a58b5b 100644 --- a/ProjectClock/AccountViewController.swift +++ b/ProjectClock/AccountViewController.swift @@ -251,6 +251,8 @@ class FamilyVC: UIViewController self.enterPin("Change Pin", "Enter your NEW pin:") { newPin in + guard newPin.count >= 4 else { self.msg("Pin Too Weak", "Your family pin must be 4 numbers or more."); return } + self.sendReq(APIs.familyChangePin, title: "Updating Pin...", params: ["oldPin": oldPin, "newPin": newPin]) { it in self.msg("Update Success!", "Your family pin is updated.")