fix for not working login
This commit is contained in:
@@ -10,6 +10,7 @@ part 'login_pending.g.dart';
|
|||||||
class PendingLoginResponse {
|
class PendingLoginResponse {
|
||||||
final AccountResponse account;
|
final AccountResponse account;
|
||||||
final TokenData pendingToken;
|
final TokenData pendingToken;
|
||||||
|
@JsonKey(name: 'target', readValue: _readTarget)
|
||||||
final String target;
|
final String target;
|
||||||
|
|
||||||
const PendingLoginResponse({
|
const PendingLoginResponse({
|
||||||
@@ -21,4 +22,6 @@ class PendingLoginResponse {
|
|||||||
factory PendingLoginResponse.fromJson(Map<String, dynamic> json) => _$PendingLoginResponseFromJson(json);
|
factory PendingLoginResponse.fromJson(Map<String, dynamic> json) => _$PendingLoginResponseFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$PendingLoginResponseToJson(this);
|
Map<String, dynamic> toJson() => _$PendingLoginResponseToJson(this);
|
||||||
|
|
||||||
|
static String _readTarget(Map json, String key) => json[key] ?? json['destination'];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user