Skip to content

Commit

Permalink
decrease ticket pagination to 15
Browse files Browse the repository at this point in the history
  • Loading branch information
hry-gh committed Nov 4, 2024
1 parent f83cfc3 commit e59a309
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ticket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ pub async fn get_tickets_by_user(
) -> Json<Vec<Ticket>> {
let mut ridsticks: Vec<(i32, i32)> = Vec::new();

let offset = (page.unwrap_or(1) - 1) * 20;
let offset = (page.unwrap_or(1) - 1) * 15;

{
let mut rows = query("SELECT DISTINCT round_id, ticket FROM ticket WHERE (sender = ? OR recipient = ?) ORDER BY round_id DESC LIMIT 20 OFFSET ?")
let mut rows = query("SELECT DISTINCT round_id, ticket FROM ticket WHERE (sender = ? OR recipient = ?) ORDER BY round_id DESC LIMIT 15 OFFSET ?")
.bind(&ckey)
.bind(&ckey)
.bind(offset)
Expand Down

0 comments on commit e59a309

Please sign in to comment.