Skip to content

Commit

Permalink
fix: remove numeric based pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanBorai committed Sep 9, 2022
1 parent 539fb30 commit 6a44750
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/controllers/crate_owner_invitation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,7 @@ fn prepare_list(
)
.load(&*conn)?
}
Page::Numeric(_) => query
.pages_pagination(pagination)
.filter(
crate_owner_invitations::crate_id.gt(seek_key.0).or(
crate_owner_invitations::crate_id
.eq(seek_key.0)
.and(crate_owner_invitations::invited_user_id.gt(seek_key.1)),
),
)
.load(&*conn)?,
Page::Numeric(_) => unreachable!("page-based pagination is disabled"),
};
let next_page = if raw_invitations.len() > pagination.per_page as usize {
// We fetch `per_page + 1` to check if there are records for the next page. Since the last
Expand Down

0 comments on commit 6a44750

Please sign in to comment.