fdds
This commit is contained in:
@@ -14,10 +14,7 @@ class CoreRepository {
|
||||
final response = await _supabase
|
||||
.from('company')
|
||||
.select()
|
||||
.eq(
|
||||
'owner_id',
|
||||
userId,
|
||||
) // <-- Assicurati di avere questo campo nel DB!
|
||||
.eq('user_id', userId) // <-- Assicurati di avere questo campo nel DB!
|
||||
.maybeSingle();
|
||||
|
||||
if (response == null) return null;
|
||||
@@ -34,7 +31,7 @@ class CoreRepository {
|
||||
.select()
|
||||
.eq('company_id', companyId)
|
||||
.eq('is_active', true) // Buona pratica
|
||||
.order('name'); // O come si chiama il campo nome
|
||||
.order('nome'); // O come si chiama il campo nome
|
||||
|
||||
return (response as List).map((s) => StoreModel.fromMap(s)).toList();
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user