Skip to content

Commit 9928290

Browse files
committed
manually getting current page instead of passing the variable around
1 parent 665bebb commit 9928290

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

sentry/src/db/channel.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ mod list_channels {
125125
creator: &Option<String>,
126126
validator: &Option<ValidatorId>,
127127
valid_until_ge: &DateTime<Utc>,
128-
page: u64,
129128
) -> Result<ChannelListResponse, RunError<bb8_postgres::tokio_postgres::Error>> {
130129
let validator = validator.as_ref().map(|validator_id| {
131130
serde_json::Value::from_str(&format!(r#"[{{"id": "{}"}}]"#, validator_id))
@@ -170,7 +169,7 @@ mod list_channels {
170169
Ok(ChannelListResponse {
171170
total_pages,
172171
total: total_pages,
173-
page,
172+
page: skip / limit as u64,
174173
channels,
175174
})
176175
}

sentry/src/routes/channel.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ pub async fn channel_list<A: Adapter>(
8989
&query.creator,
9090
&query.validator,
9191
&query.valid_until_ge,
92-
query.page,
9392
)
9493
.await?;
9594

0 commit comments

Comments
 (0)