Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. public func deactivateAllBalances(completion: @escaping (() -> ())) {
  2. getAllBalanceIds { (balanceIds) in
  3. guard let balanceIds = balanceIds else { return }
  4. for balanceId in balanceIds {
  5. let db = Firestore.firestore()
  6. let userId = Auth.auth().currentUser?.uid ?? ""
  7. db.collection("account").document(userId).collection("balance").document(balanceId).setValue(false, forKey: "active")
  8. //db.document("account/(userId)/balance/(balanceId)").setValue(false, forKey: "active")
  9. }
  10. completion()
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement