[+] Implement leave family

This commit is contained in:
Hykilpikonna
2021-01-24 20:59:54 -05:00
parent 9d4f4c212b
commit 6aed3cf6b4
2 changed files with 19 additions and 1 deletions
+15
View File
@@ -260,6 +260,21 @@ class FamilyVC: UIViewController
}
}
}
/**
Called when the user clicks the leave family button
*/
@IBAction func btnLeave(_ sender: Any)
{
enterPin()
{
self.sendReq(APIs.familyChangePin, title: "Leaving...", params: ["pin": $0]) { it in
localStorage.removeObject(forKey: "family")
self.msg("Leave Success!", "You left the family.")
}
}
}
}
/**