mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-26 23:44:53 +00:00
updated add to room, and verify to space
This commit is contained in:
@ -239,12 +239,12 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
|
||||
Future<bool> joinAUnit(String code) async {
|
||||
try {
|
||||
var uuid =
|
||||
var userUuid =
|
||||
await const FlutterSecureStorage().read(key: UserModel.userUuidKey) ??
|
||||
'';
|
||||
Map<String, String> body = {'userUuid': uuid, 'inviteCode': code};
|
||||
Map<String, String> body = {'inviteCode': code};
|
||||
|
||||
final success = await SpacesAPI.joinUnit(body);
|
||||
final success = await SpacesAPI.joinUnit(userUuid, body);
|
||||
if (success) {
|
||||
await fetchUnitsByUserId();
|
||||
CustomSnackBar.displaySnackBar('Done successfully');
|
||||
|
||||
Reference in New Issue
Block a user