fix(code_push_protocol): remove updatedAt from PatchArtifact (#1323)
This commit is contained in:
@@ -19,7 +19,6 @@ class PatchArtifact {
|
||||
required this.size,
|
||||
required this.url,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
/// Converts a Map<String, dynamic> to a [PatchArtifact]
|
||||
@@ -52,7 +51,4 @@ class PatchArtifact {
|
||||
|
||||
/// The date and time the artifact was created.
|
||||
final DateTime createdAt;
|
||||
|
||||
/// The date and time the artifact was last updated.
|
||||
final DateTime updatedAt;
|
||||
}
|
||||
|
||||
@@ -24,16 +24,10 @@ PatchArtifact _$PatchArtifactFromJson(Map<String, dynamic> json) =>
|
||||
url: $checkedConvert('url', (v) => v as String),
|
||||
createdAt:
|
||||
$checkedConvert('created_at', (v) => DateTime.parse(v as String)),
|
||||
updatedAt:
|
||||
$checkedConvert('updated_at', (v) => DateTime.parse(v as String)),
|
||||
);
|
||||
return val;
|
||||
},
|
||||
fieldKeyMap: const {
|
||||
'patchId': 'patch_id',
|
||||
'createdAt': 'created_at',
|
||||
'updatedAt': 'updated_at'
|
||||
},
|
||||
fieldKeyMap: const {'patchId': 'patch_id', 'createdAt': 'created_at'},
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PatchArtifactToJson(PatchArtifact instance) =>
|
||||
@@ -46,7 +40,6 @@ Map<String, dynamic> _$PatchArtifactToJson(PatchArtifact instance) =>
|
||||
'size': instance.size,
|
||||
'url': instance.url,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
};
|
||||
|
||||
const _$ReleasePlatformEnumMap = {
|
||||
|
||||
-4
@@ -16,7 +16,6 @@ void main() {
|
||||
size: 42,
|
||||
hash: 'sha256:1234567890',
|
||||
createdAt: DateTime(2023),
|
||||
updatedAt: DateTime(2023),
|
||||
),
|
||||
PatchArtifact(
|
||||
id: 2,
|
||||
@@ -27,7 +26,6 @@ void main() {
|
||||
size: 42,
|
||||
hash: 'sha256:1234567890',
|
||||
createdAt: DateTime(2023),
|
||||
updatedAt: DateTime(2023),
|
||||
),
|
||||
],
|
||||
2: [
|
||||
@@ -40,7 +38,6 @@ void main() {
|
||||
size: 42,
|
||||
hash: 'sha256:1234567890',
|
||||
createdAt: DateTime(2023),
|
||||
updatedAt: DateTime(2023),
|
||||
),
|
||||
PatchArtifact(
|
||||
id: 4,
|
||||
@@ -51,7 +48,6 @@ void main() {
|
||||
size: 42,
|
||||
hash: 'sha256:1234567890',
|
||||
createdAt: DateTime(2023),
|
||||
updatedAt: DateTime(2023),
|
||||
),
|
||||
],
|
||||
},
|
||||
|
||||
@@ -13,7 +13,6 @@ void main() {
|
||||
size: 42,
|
||||
hash: 'sha256:1234567890',
|
||||
createdAt: DateTime(2023),
|
||||
updatedAt: DateTime(2023),
|
||||
);
|
||||
expect(
|
||||
PatchArtifact.fromJson(artifact.toJson()).toJson(),
|
||||
|
||||
Reference in New Issue
Block a user