fix(code_push_protocol): remove updatedAt from PatchArtifact (#1323)

This commit is contained in:
Felix Angelov
2023-09-25 11:52:56 -05:00
committed by GitHub
parent 0f51bd9cc6
commit 6d3d34dec5
4 changed files with 1 additions and 17 deletions
@@ -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 = {
@@ -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(),