Skip to content

Commit

Permalink
Atualização do ListTicketService
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh committed Dec 24, 2022
1 parent 5827a45 commit 6bbd2f0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/src/services/TicketServices/ListTicketsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import Ticket from "../../models/Ticket";
import Contact from "../../models/Contact";
import Message from "../../models/Message";
import Queue from "../../models/Queue";
import ShowUserService from "../UserServices/ShowUserService";
import Whatsapp from "../../models/Whatsapp";
import ShowUserService from "../UserServices/ShowUserService";

interface Request {
searchParam?: string;
Expand Down Expand Up @@ -45,7 +45,8 @@ const ListTicketsService = async ({
{
model: Contact,
as: "contact",
attributes: ["id", "name", "number", "profilePicUrl"]
attributes: ["id", "name", "number", "profilePicUrl"],
include: ["extraInfo", "contactTags", "tags"]
},
{
model: Queue,
Expand Down Expand Up @@ -132,7 +133,7 @@ const ListTicketsService = async ({
};
}

const limit = 40;
const limit = 999;
const offset = limit * (+pageNumber - 1);

const { count, rows: tickets } = await Ticket.findAndCountAll({
Expand Down

0 comments on commit 6bbd2f0

Please sign in to comment.