Skip to content

Commit

Permalink
fix: pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
litsynp committed Sep 23, 2023
1 parent 4ad9ad9 commit 859a087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/todo/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ pub async fn find_todos(pool: PgPool, page: i32, size: i32) -> Result<Vec<Todo>,
$2
",
)
.bind(20)
.bind((page - 1) * size)
.bind(size)
.fetch_all(&pool)
.await?;

Expand Down

0 comments on commit 859a087

Please sign in to comment.