correções nas turmas e disciplinas
This commit is contained in:
@@ -90,6 +90,20 @@ class AuthService {
|
||||
}
|
||||
}
|
||||
|
||||
/// Ler schoolClassId do aluno na Firestore (turma escolar definida no registo)
|
||||
static Future<String?> getStudentSchoolClassId(String uid) async {
|
||||
try {
|
||||
final doc = await _firestore.collection('users').doc(uid).get();
|
||||
if (doc.exists) {
|
||||
return doc.data()?['schoolClassId'] as String?;
|
||||
}
|
||||
return null;
|
||||
} catch (e) {
|
||||
print('DEBUG: Erro ao ler schoolClassId: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// Ler role do usuário na Firestore
|
||||
static Future<String?> getUserRole(String uid) async {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user