Finish TODO Parse DateTime before publishing this field

This commit is contained in:
D. Scott Boggs 2023-01-02 06:34:09 -05:00 committed by Scott Boggs
parent 94624ac1db
commit acef484b73
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use time::{serde::iso8601, OffsetDateTime};
/// Represents a single Filter /// Represents a single Filter
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
@ -6,7 +7,8 @@ pub struct Filter {
id: String, id: String,
phrase: String, phrase: String,
context: Vec<FilterContext>, context: Vec<FilterContext>,
expires_at: Option<String>, // TODO: timestamp #[serde(with = "iso8601::option")]
expires_at: Option<OffsetDateTime>,
irreversible: bool, irreversible: bool,
whole_word: bool, whole_word: bool,
} }