Skip to content

Commit

Permalink
Merge pull request #63 from mdcpp/master
Browse files Browse the repository at this point in the history
fix raw text paginator bug(not using offset and size)
  • Loading branch information
KAIYOHUGO authored Aug 14, 2024
2 parents 84485e6 + 2a53386 commit b14cbd9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions backend/src/entity/util/paginator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,18 @@ impl<S: Source, R: Reflect<S::Entity>> PaginateRaw for PrimaryKeyPaginator<S, R>
async fn new_fetch(
data: S::Data,
auth: &Auth,
_size: u64,
_offset: u64,
size: u64,
offset: u64,
abs_dir: bool,
db: &DatabaseConnection,
) -> Result<(Self, Vec<R>), Error> {
let query = order_by_bool(
S::filter(auth, &data, db).await?,
<S as Source>::ID,
abs_dir,
);
)
.limit(size)
.offset(offset);

let models = R::all(query, db).await?;

Expand Down

0 comments on commit b14cbd9

Please sign in to comment.