Skip to content

Commit

Permalink
Update the Version Key
Browse files Browse the repository at this point in the history
This updates the version key to be part of the MetricEvent vs the
payload.
  • Loading branch information
anthonycastelli committed Jun 17, 2024
1 parent c38bbb1 commit 3500a69
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions lib/networking/metric_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class MetricEvent {
/// Converts the [MetricEvent] to a JSON object.
Map<String, dynamic> toJson() {
return {
'version': "2",
'eventSource': 'appfit',
'occurredAt': occurredAt.toIso8601String(),
'payload': payload.toJson(),
Expand Down
1 change: 0 additions & 1 deletion lib/networking/metric_payload.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class MetricPayload {
/// Converts the [MetricPayload] to a JSON object.
Map<String, dynamic> toJson() {
return {
'version': "2",
'sourceEventId': sourceEventId,
'eventName': eventName,
'origin': 'flutter',
Expand Down

0 comments on commit 3500a69

Please sign in to comment.