fix(notification): scheduled notifications not working (#909)

* fix(notification): scheduled notifications not working

* do not use toJSON since it doesnt work on isolation pattern

* fmt
This commit is contained in:
Lucas Fernandes Nogueira
2024-01-24 13:02:11 -03:00
committed by GitHub
parent 61edbbec0a
commit 8dea78ac7d
11 changed files with 102 additions and 56 deletions
+11 -8
View File
@@ -51,14 +51,14 @@ impl Display for ScheduleEvery {
f,
"{}",
match self {
Self::Year => "Year",
Self::Month => "Month",
Self::TwoWeeks => "TwoWeeks",
Self::Week => "Week",
Self::Day => "Day",
Self::Hour => "Hour",
Self::Minute => "Minute",
Self::Second => "Second",
Self::Year => "year",
Self::Month => "month",
Self::TwoWeeks => "twoWeeks",
Self::Week => "week",
Self::Day => "day",
Self::Hour => "hour",
Self::Minute => "minute",
Self::Second => "second",
}
)
}
@@ -96,6 +96,7 @@ impl<'de> Deserialize<'de> for ScheduleEvery {
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum Schedule {
#[serde(rename_all = "camelCase")]
At {
#[serde(
serialize_with = "iso8601::serialize",
@@ -107,11 +108,13 @@ pub enum Schedule {
#[serde(default)]
allow_while_idle: bool,
},
#[serde(rename_all = "camelCase")]
Interval {
interval: ScheduleInterval,
#[serde(default)]
allow_while_idle: bool,
},
#[serde(rename_all = "camelCase")]
Every {
interval: ScheduleEvery,
count: u8,