mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
visitor password api
This commit is contained in:
@ -63,7 +63,7 @@ class AccessMangApi{
|
||||
}');
|
||||
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.sendOfflineOneTime,
|
||||
path: ApiEndpoints.sendOnlineOneTime,
|
||||
body: jsonEncode({
|
||||
"email": email,
|
||||
"passwordName": passwordName,
|
||||
@ -106,7 +106,7 @@ class AccessMangApi{
|
||||
print('createPassword =$body');
|
||||
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.sendOfflineMultipleTime,
|
||||
path: ApiEndpoints.sendOnlineMultipleTime,
|
||||
body: jsonEncode(body),
|
||||
showServerMessage: true,
|
||||
expectedResponseModel: (json) {
|
||||
@ -121,7 +121,76 @@ class AccessMangApi{
|
||||
}
|
||||
}
|
||||
|
||||
// OffLine One Time Password
|
||||
|
||||
Future postOffLineOneTime({String? email,String? passwordName,List<String>? devicesUuid}) async {
|
||||
try {
|
||||
|
||||
print('postOfflineOneTime List: ${
|
||||
{
|
||||
"email": email,
|
||||
"passwordName": passwordName,
|
||||
"devicesUuid": devicesUuid
|
||||
}
|
||||
}');
|
||||
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.sendOffLineOneTime,
|
||||
body: jsonEncode({
|
||||
"email": email,
|
||||
"passwordName": passwordName,
|
||||
"devicesUuid": devicesUuid
|
||||
}),
|
||||
showServerMessage: true,
|
||||
expectedResponseModel: (json) {
|
||||
List<dynamic> jsonData = json;
|
||||
print('postOfflineOneTime List: $json');
|
||||
},
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
debugPrint('Error fetching $e');
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
Future postOffLineMultipleTime({
|
||||
String? email,
|
||||
String? passwordName,
|
||||
String? effectiveTime,
|
||||
String? invalidTime,
|
||||
List<String>? devicesUuid
|
||||
|
||||
}) async {
|
||||
try {
|
||||
|
||||
print('postOfflineOneTime List: ${
|
||||
{
|
||||
"email": email,
|
||||
"passwordName": passwordName,
|
||||
"devicesUuid": devicesUuid
|
||||
}
|
||||
}');
|
||||
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.sendOffLineOneTime,
|
||||
body: jsonEncode({
|
||||
"email": email,
|
||||
"devicesUuid":devicesUuid,
|
||||
"passwordName": passwordName,
|
||||
"effectiveTime": effectiveTime,
|
||||
"invalidTime": invalidTime
|
||||
}),
|
||||
showServerMessage: true,
|
||||
expectedResponseModel: (json) {
|
||||
List<dynamic> jsonData = json;
|
||||
print('postOfflineOneTime List: $json');
|
||||
},
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
debugPrint('Error fetching $e');
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user