setUserMembershipTo method
Implementation
Future<void> setUserMembershipTo(String membership) async {
final currentUserUid = ref
.read(firebaseAuthRepositoryProvider().notifier)
.getCurrentUser()
?.uid;
try {
await _firebaseFirestoreInstance
.collection('FirestoreUsers')
.doc(currentUserUid)
.get()
.then((DocumentSnapshot<Map<String, dynamic>> documentSnapshot) {
if (documentSnapshot.exists) {
_firebaseFirestoreInstance
.collection('FirestoreUsers')
.doc(currentUserUid)
.update({'membership': membership});
}
});
} catch (e) {
// debugPrint("setUserMembershipTo: 문제가 발생했습니다.");
debugPrint("[Error]: $e");
}
}