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

Commit

Permalink
capture: don't serialize sent_at if empty (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
xvello authored Apr 30, 2024
1 parent 26a67e9 commit 9f5b72d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion capture/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ pub struct ProcessedEvent {
pub ip: String,
pub data: String,
pub now: String,
#[serde(with = "time::serde::rfc3339::option")]
#[serde(
with = "time::serde::rfc3339::option",
skip_serializing_if = "Option::is_none"
)]
pub sent_at: Option<OffsetDateTime>,
pub token: String,
}
Expand Down

0 comments on commit 9f5b72d

Please sign in to comment.