Skip to content

Commit

Permalink
verifying + routing admin profile or user profile
Browse files Browse the repository at this point in the history
  • Loading branch information
auguzsto committed Jul 28, 2023
1 parent 5cd581d commit 6532768
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/src/shared/controllers/auth_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ class AuthController extends GetxController {
user.numberPhone = value['numberPhone'];
user.vendor = value['vendor'];
user.basicToken = value['basicToken'];

user.vendor == 1
? Get.offAll(const HomeAdminScreen())
: Get.offAll(const HomeScreen());
});

if (Get.find<UserModel>(tag: "user").vendor == 1) {
return Get.offAll(const HomeAdminScreen());
}
// if (Get.find<UserModel>(tag: "user").vendor == 1) {
// return Get.offAll(const HomeAdminScreen());
// }

Get.offAll(const HomeScreen());
// Get.offAll(const HomeScreen());
}
isLoading.value = false;
},
Expand Down

0 comments on commit 6532768

Please sign in to comment.