daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top