fix : login api call

This commit is contained in:
2025-05-17 17:07:44 +03:30
parent 303ff86d85
commit 6843973c4f
12 changed files with 180 additions and 130 deletions

View File

@@ -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();
}
}