Skip to content

Commit 7f0fcd8

Browse files
committed
sentry - routes - channel - fix ChannelListQuery.valid_until_ge
1 parent b11b0a9 commit 7f0fcd8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sentry/src/routes/channel.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ pub async fn last_approved<A: Adapter>(
117117
}
118118

119119
mod channel_list {
120+
use chrono::serde::ts_seconds::deserialize as ts_seconds;
120121
use chrono::{DateTime, Utc};
121122
use primitives::{Channel, ValidatorId};
122123
use serde::{Deserialize, Serialize};
@@ -133,7 +134,12 @@ mod channel_list {
133134
#[serde(default = "default_page")]
134135
pub page: u64,
135136
/// filters the list on `valid_until >= valid_until_ge`
136-
#[serde(default = "Utc::now")]
137+
/// It should be the same timestamp format as the `Channel.valid_until`: **seconds**
138+
#[serde(
139+
deserialize_with = "ts_seconds",
140+
default = "Utc::now",
141+
rename = "validUntil"
142+
)]
137143
pub valid_until_ge: DateTime<Utc>,
138144
pub creator: Option<String>,
139145
/// filters the channels containing a specific validator if provided

0 commit comments

Comments
 (0)