Skip to content
This repository was archived by the owner on Jun 21, 2024. It is now read-only.

Commit 5384775

Browse files
committed
capture: don't serialize sent_at if empty
1 parent 26a67e9 commit 5384775

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

capture/src/api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub struct ProcessedEvent {
8787
pub ip: String,
8888
pub data: String,
8989
pub now: String,
90-
#[serde(with = "time::serde::rfc3339::option")]
90+
#[serde(with = "time::serde::rfc3339::option", skip_serializing_if = "Option::is_none")]
9191
pub sent_at: Option<OffsetDateTime>,
9292
pub token: String,
9393
}

0 commit comments

Comments
 (0)