fix
This commit is contained in:
@@ -28,6 +28,21 @@ class CoreRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<CompanyModel?> getCompanyById(String companyId) async {
|
||||
try {
|
||||
final response = await _supabase
|
||||
.from('company')
|
||||
.select()
|
||||
.eq('id', companyId)
|
||||
.maybeSingle();
|
||||
if (response == null) return null;
|
||||
return CompanyModel.fromMap(response);
|
||||
} catch (e) {
|
||||
debugPrint('Errore recupero azienda per ID: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<StoreModel>> getStoresByCompanyId(String companyId) async {
|
||||
try {
|
||||
final response = await _supabase
|
||||
|
||||
Reference in New Issue
Block a user