new schemas
This commit is contained in:
@@ -29,17 +29,14 @@ class HubRepositoryImpl implements HubRepositoryInterface {
|
||||
final business = await _getBusinessForCurrentUser();
|
||||
final teamId = await _getOrCreateTeamId(business);
|
||||
final city = business.city;
|
||||
if (city == null || city.isEmpty) {
|
||||
throw Exception('Business city is missing.');
|
||||
}
|
||||
|
||||
final result = await _dataConnect
|
||||
.createTeamHub(
|
||||
teamId: teamId,
|
||||
hubName: name,
|
||||
address: address,
|
||||
city: city,
|
||||
)
|
||||
.city(city?.isNotEmpty == true ? city : '')
|
||||
.execute();
|
||||
final createdId = result.data?.teamHub_insert.id;
|
||||
if (createdId == null) {
|
||||
|
||||
Reference in New Issue
Block a user