rework-onboarding (#7)
Onboarding completato, ora super rapido e top Reviewed-on: http://catelliub.zapto.org:3000/brontomark/flux/pulls/7 Co-authored-by: Mark M2 Macbook <marco@catelli.it> Co-committed-by: Mark M2 Macbook <marco@catelli.it>
This commit is contained in:
@@ -9,11 +9,11 @@ class CompanyRepository {
|
||||
// .select().single() trasforma la risposta nell'oggetto appena inserito
|
||||
final response = await _supabase
|
||||
.from('company')
|
||||
.insert(company.toJson())
|
||||
.insert(company.toMap())
|
||||
.select()
|
||||
.single();
|
||||
|
||||
return CompanyModel.fromJson(response);
|
||||
return CompanyModel.fromMap(response);
|
||||
} on PostgrestException catch (e) {
|
||||
throw e.message;
|
||||
} catch (e) {
|
||||
@@ -30,7 +30,7 @@ class CompanyRepository {
|
||||
.eq('user_id', userId as Object)
|
||||
.maybeSingle();
|
||||
|
||||
return response != null ? CompanyModel.fromJson(response) : null;
|
||||
return response != null ? CompanyModel.fromMap(response) : null;
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user