diff --git a/backend/src/services/ContactServices/UpdateContactService.ts b/backend/src/services/ContactServices/UpdateContactService.ts index a4963e5..55b49df 100644 --- a/backend/src/services/ContactServices/UpdateContactService.ts +++ b/backend/src/services/ContactServices/UpdateContactService.ts @@ -70,7 +70,7 @@ const UpdateContactService = async ({ where: { number } }); - if (numberExists) { + if (numberExists && numberExists.id != +contactId) { throw new AppError("ERR_DUPLICATED_CONTACT"); } }