mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
refactor: Fix errors in api/server/backfill.rs
This commit is contained in:
@@ -67,12 +67,7 @@ pub(crate) async fn get_backfill_route(
|
||||
.ready_fold(PduCount::min(), cmp::max)
|
||||
.await;
|
||||
|
||||
Ok(get_backfill::v1::Response {
|
||||
origin_server_ts: MilliSecondsSinceUnixEpoch::now(),
|
||||
|
||||
origin: services.globals.server_name().to_owned(),
|
||||
|
||||
pdus: services
|
||||
let pdus = services
|
||||
.rooms
|
||||
.timeline
|
||||
.pdus_rev(&body.room_id, Some(from.saturating_add(1)))
|
||||
@@ -109,6 +104,11 @@ pub(crate) async fn get_backfill_route(
|
||||
.map(Ok)
|
||||
})
|
||||
.try_collect()
|
||||
.await?,
|
||||
})
|
||||
.await?;
|
||||
|
||||
Ok(get_backfill::v1::Response::new(
|
||||
services.globals.server_name().to_owned(),
|
||||
MilliSecondsSinceUnixEpoch::now(),
|
||||
pdus,
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user