In user registration add standard whatsapp field

This commit is contained in:
Ricardo Paes
2022-02-25 08:18:57 -03:00
parent 61df7c8bc0
commit 84bbe3afaa
11 changed files with 62 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
import { Sequelize, Op } from "sequelize";
import Queue from "../../models/Queue";
import User from "../../models/User";
import Whatsapp from "../../models/Whatsapp";
interface Request {
searchParam?: string;
@@ -39,7 +40,8 @@ const ListUsersService = async ({
offset,
order: [["createdAt", "DESC"]],
include: [
{ model: Queue, as: "queues", attributes: ["id", "name", "color"] }
{ model: Queue, as: "queues", attributes: ["id", "name", "color"] },
{ model: Whatsapp, as: "whatsapp", attributes: ["id", "name"] },
]
});