mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
login Enhancements and add search to forget password
This commit is contained in:
@ -43,7 +43,6 @@ class HomeBloc extends Bloc<HomeEvent, HomeState> {
|
|||||||
try {
|
try {
|
||||||
var uuid = await const FlutterSecureStorage().read(key: UserModel.userUuidKey);
|
var uuid = await const FlutterSecureStorage().read(key: UserModel.userUuidKey);
|
||||||
user = await HomeApi().fetchUserInfo(uuid);
|
user = await HomeApi().fetchUserInfo(uuid);
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ class AccessMangApi {
|
|||||||
);
|
);
|
||||||
return response;
|
return response;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint('Error fetching visitor passwords: $e');
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -42,7 +41,6 @@ class AccessMangApi {
|
|||||||
);
|
);
|
||||||
return response;
|
return response;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint('Error fetching $e');
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -123,13 +121,6 @@ class AccessMangApi {
|
|||||||
String? effectiveTime,
|
String? effectiveTime,
|
||||||
String? invalidTime,
|
String? invalidTime,
|
||||||
List<String>? devicesUuid}) async {
|
List<String>? devicesUuid}) async {
|
||||||
print('object=== ${ jsonEncode({
|
|
||||||
"email": email,
|
|
||||||
"devicesUuid": devicesUuid,
|
|
||||||
"passwordName": passwordName,
|
|
||||||
"effectiveTime": effectiveTime,
|
|
||||||
"invalidTime": invalidTime,
|
|
||||||
})}');
|
|
||||||
final response = await HTTPService().post(
|
final response = await HTTPService().post(
|
||||||
path: ApiEndpoints.sendOffLineMultipleTime,
|
path: ApiEndpoints.sendOffLineMultipleTime,
|
||||||
body: jsonEncode({
|
body: jsonEncode({
|
||||||
|
@ -26,7 +26,6 @@ class AuthenticationAPI {
|
|||||||
body: {"email": email, "password": password},
|
body: {"email": email, "password": password},
|
||||||
showServerMessage: true,
|
showServerMessage: true,
|
||||||
expectedResponseModel: (json) {
|
expectedResponseModel: (json) {
|
||||||
print('json=$json');
|
|
||||||
});
|
});
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
@ -54,15 +53,12 @@ class AuthenticationAPI {
|
|||||||
return cooldown;
|
return cooldown;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
debugPrint('Error: ${e.response!.statusCode} - ${e.response!.statusMessage}');
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
debugPrint('Error: ${e.message}');
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint('Unexpected Error: $e');
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ class HomeApi {
|
|||||||
path: ApiEndpoints.getUser.replaceAll('{userUuid}', userId!),
|
path: ApiEndpoints.getUser.replaceAll('{userUuid}', userId!),
|
||||||
showServerMessage: true,
|
showServerMessage: true,
|
||||||
expectedResponseModel: (json) {
|
expectedResponseModel: (json) {
|
||||||
print('fetchUserInfo$json');
|
|
||||||
return UserModel.fromJson(json);
|
return UserModel.fromJson(json);
|
||||||
});
|
});
|
||||||
return response;
|
return response;
|
||||||
|
Reference in New Issue
Block a user