Finish TODO Parse DateTime before publishing this field
This commit is contained in:
parent
94624ac1db
commit
acef484b73
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue