INSHALLAH SUI
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
use crate::{
|
||||
models::{AutoIssuedTicket, IssuedTicket, NewTicket, Ticket},
|
||||
schema::{
|
||||
drivers,
|
||||
issued_tickets::{self, driver},
|
||||
tickets,
|
||||
},
|
||||
schema::{issued_tickets, tickets},
|
||||
};
|
||||
use common::CommonTicket;
|
||||
use diesel::prelude::*;
|
||||
@@ -30,7 +26,8 @@ pub fn get_tickets(connection: &mut PgConnection, driver_id: i32) -> Vec<CommonT
|
||||
tickets::category,
|
||||
tickets::description,
|
||||
tickets::issue_date, //only selecting the ticket tho :D
|
||||
));
|
||||
))
|
||||
.filter(tickets::id.eq(driver_id));
|
||||
let tickets_by_driver = join.load::<Ticket>(connection).expect("oh no!");
|
||||
let common_ticket_output = tickets_by_driver
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user