fix : login api call
This commit is contained in:
@@ -38,6 +38,7 @@ class AuthLogic extends GetxController {
|
||||
Rx<OtpStatus> otpStatus = OtpStatus.init.obs;
|
||||
|
||||
RxInt secondsRemaining = 120.obs;
|
||||
int wsd = 120;
|
||||
Timer? _timer;
|
||||
|
||||
AuthRepositoryImpl authRepository = diAuth.get<AuthRepositoryImpl>();
|
||||
@@ -111,7 +112,7 @@ class AuthLogic extends GetxController {
|
||||
isLoading.value = true;
|
||||
await safeCall<AuthResponseModel?>(
|
||||
call: () => authRepository.login(authRequest: loginRequestModel.toJson()),
|
||||
onSuccess: (result) async{
|
||||
onSuccess: (result) async {
|
||||
await tokenStorageService.saveRefreshToken(result!.refresh!);
|
||||
await tokenStorageService.saveAccessToken(result!.access!);
|
||||
//Get.offAndToNamed(Routes.home);
|
||||
@@ -125,4 +126,9 @@ class AuthLogic extends GetxController {
|
||||
);
|
||||
isLoading.value = false;
|
||||
}
|
||||
|
||||
adder() {
|
||||
tokenStorageService.tsss.value = (wsd++).toString();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user