export async function findTicketById(ticketId: string) {
const ticket = await db.query.ticketsTable.findFirst({
where: (tickets, { eq }) => eq(tickets.ticketId, ticketId),
with: {
assignedTo: true,
createdBy: true,
user: true,
},
});
return ticket;
}
export async function findTicketById(ticketId: string) {
const ticket = await db.query.ticketsTable.findFirst({
where: (tickets, { eq }) => eq(tickets.ticketId, ticketId),
with: {
assignedTo: true,
createdBy: true,
user: true,
},
});
return ticket;
}