Fixed tokens revokation
This commit is contained in:
@@ -11,7 +11,9 @@ class ChangePassword {
|
||||
@JsonKey(name: 'new')
|
||||
final String newPassword;
|
||||
|
||||
const ChangePassword({required this.oldPassword, required this.newPassword});
|
||||
final String deviceId;
|
||||
|
||||
const ChangePassword({required this.oldPassword, required this.newPassword, required this.deviceId});
|
||||
|
||||
factory ChangePassword.fromJson(Map<String, dynamic> json) => _$ChangePasswordFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ChangePasswordToJson(this);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:pshared/service/device_id.dart';
|
||||
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
@@ -66,7 +67,11 @@ class AccountService {
|
||||
return _getAccount(AuthorizationService.getPATCHResponse(
|
||||
_objectType,
|
||||
'password',
|
||||
ChangePassword(oldPassword: oldPassword, newPassword: newPassword).toJson(),
|
||||
ChangePassword(
|
||||
oldPassword: oldPassword,
|
||||
newPassword: newPassword,
|
||||
deviceId: await DeviceIdManager.getDeviceId(),
|
||||
).toJson(),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user