setUserMembershipTo method
membership: 'Admin', 'Manager', 'Full', 'Associate', 'Guest'
Implementation
Future<void> setUserMembershipTo(String membership) async {
final currentUserUid = ref
.read(firebaseAuthRepositoryProvider().notifier)
.getCurrentUser()
?.uid;
try {
await _firebaseFirestoreInstance
.collection('Authorizations')
.doc('${membership}s')
.collection('FirestoreUsers')
.doc(currentUserUid)
.set({'uid': currentUserUid});
} catch (e) {
// debugPrint("setUserMembershipTo: 문제가 발생했습니다.");
debugPrint("[Error]: $e");
}
}