mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 20:29:17 +00:00
enabled socket events on contact controller
This commit is contained in:
@@ -16,8 +16,8 @@ interface Request {
|
||||
const CreateContactService = async ({
|
||||
name,
|
||||
number,
|
||||
email,
|
||||
extraInfo
|
||||
email = "",
|
||||
extraInfo = []
|
||||
}: Request): Promise<Contact> => {
|
||||
const numberExists = await Contact.findOne({
|
||||
where: { number }
|
||||
@@ -27,6 +27,8 @@ const CreateContactService = async ({
|
||||
throw new AppError("A contact with this number already exists.");
|
||||
}
|
||||
|
||||
console.log("extra", extraInfo);
|
||||
|
||||
const contact = await Contact.create(
|
||||
{
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user