add device info at login
This commit is contained in:
@@ -21,11 +21,28 @@ class AuthRemoteDataProvider {
|
||||
Future<DC<AuthFailure, AuthDto>> login({
|
||||
required String email,
|
||||
required String password,
|
||||
required String deviceId,
|
||||
required String deviceName,
|
||||
required String deviceType,
|
||||
required String platform,
|
||||
required String osVersion,
|
||||
required String appVersion,
|
||||
String? fcmToken,
|
||||
}) async {
|
||||
try {
|
||||
final response = await _apiClient.post(
|
||||
ApiPath.login,
|
||||
data: {'email': email, 'password': password},
|
||||
data: {
|
||||
'email': email,
|
||||
'password': password,
|
||||
'device_id': deviceId,
|
||||
'device_name': deviceName,
|
||||
'device_type': deviceType,
|
||||
'platform': platform,
|
||||
'os_version': osVersion,
|
||||
'app_version': appVersion,
|
||||
if (fcmToken != null) 'fcm_token': fcmToken,
|
||||
},
|
||||
);
|
||||
|
||||
if (response.data['code'] == 401) {
|
||||
|
||||
Reference in New Issue
Block a user