api changes to update token.

main_production_audio_video_call
Sikander Saleem 2 weeks ago
parent e022aff0b0
commit 23fff42c17

@ -21,7 +21,7 @@ class URLs {
static const String chatHubUrlChat = "$chatHubUrl/hubs/chat"; // new V2 apis
static const String resetMessageCount = "$chatHubUrlApi/userChatHistory/AckMessages"; // new V2 apis
static const String unreadMessages = "$chatHubUrlApi/userChatHistory/unread-messages"; // new V2 apis
static const String updateDeviceInfo = "$chatHubUrlApi/user/update-device-info"; // new V2 apis
static const String updateDeviceInfo = "$chatHubUrlApi/auth/update-device-info"; // new V2 apis
static const String chatApiKey = "f53a98286f82798d588f67a7f0db19f7aebc839e"; // new V2 apis
static String _host = host1;

@ -61,13 +61,14 @@ class ChatApiClient {
Future<bool> updateDeviceInfo(String employeeNumber) async {
final Map<String, dynamic> payload = {
"apiKey": URLs.chatApiKey,
"employeeNumber": employeeNumber,
"deviceToken": FirebaseNotificationManger.token,
"isHuaweiDevice": (await myPlatform()) == "HUAWEI",
"platform": await myPlatform(),
"voIPToken": FirebaseNotificationManger.voipToken,
};
final Response response = await ApiClient().postJsonForResponse(URLs.updateDeviceInfo, payload, token: chatLoginResponse!.token);
final Response response = await ApiClient().postJsonForResponse(URLs.updateDeviceInfo, payload);
return response.statusCode == 200;
}

Loading…
Cancel
Save