fix: changed default text to username and surname

master
adriano 2024-09-30 10:53:32 -03:00
parent e2372fad37
commit e76cf69f3f
5 changed files with 8 additions and 8 deletions

View File

@ -8,7 +8,7 @@ const CRM = require('../models/CRM')
const requestConfigHeader = require('./requestConfigHeader')
const sendMessageSocket = require('./sendMessageSocket')
async function createContact(companyId, rest, authentication, crmPhone, crmFirstName = 'unnamed', crmLastName = 'no surname', crmEmail = '', test = {}) {
async function createContact(companyId, rest, authentication, crmPhone, crmFirstName = 'Username', crmLastName = 'Last name', crmEmail = '', test = {}) {
let { request, body, response } = findProperty(rest, 'createContactRecord')
const { requestContentType, requestEncoding, requestType, responseType, url } = request
@ -29,7 +29,7 @@ async function createContact(companyId, rest, authentication, crmPhone, crmFirst
body[prop] = variable
} else {
if (body[prop] == 'crmLastName' && !crmLastName) {
body[prop] = 'unnamed'
body[prop] = 'Username'
}
else
delete body[prop]

View File

@ -10,7 +10,7 @@ const requestConfigHeader = require('./requestConfigHeader')
const sendEventTicketCreatedToSocket = require('./sendEventTicketCreatedToSocket')
async function createTicket(companyId, rest, authentication, crmPhone, crmFirstName = 'unnamed', crmLastName = 'no surname', crmEmail = '', test = {}, crmContactId, crmAgent) {
async function createTicket(companyId, rest, authentication, crmPhone, crmFirstName = 'Username', crmLastName = 'Last name', crmEmail = '', test = {}, crmContactId, crmAgent) {
let { request, body, response } = findProperty(rest, 'createTicketRecord')
@ -34,7 +34,7 @@ async function createTicket(companyId, rest, authentication, crmPhone, crmFirstN
body[prop] = variable
} else {
if (body[prop] == 'crmLastName' && !crmLastName) {
body[prop] = 'unnamed'
body[prop] = 'Username'
}
else
delete body[prop]

View File

@ -5,7 +5,7 @@ const findProperty = require('./findProperty')
const journalingRequest = require('./journalingRequest')
async function journaling(companyId, operation, crmPhone, crmAgent, crmCallDuration = 0, crmFirstName ='unnamed') {
async function journaling(companyId, operation, crmPhone, crmAgent, crmCallDuration = 0, crmFirstName ='Username') {
const crmFiles = await loadCRM(companyId)

View File

@ -23,7 +23,7 @@ async function templateValidator(crmPhoneTest, crm, companyId) {
rest = crm.crmRest,
authentication = crm.authentication,
crmPhone = phoneTest,
crmFirstName = 'unnamed',
crmFirstName = 'Username',
crmLastName = '',
crmEmail = '',
test = { testing: true })

View File

@ -10,7 +10,7 @@ const createTicket = require('./createTicket')
const lookupCRMTicket = require('./lookupCRMTicket')
async function ticketCRM(companyId, crmPhone, crmAgent, crmFirstName = 'unnamed') {
async function ticketCRM(companyId, crmPhone, crmAgent, crmFirstName = 'Username') {
const crmFiles = await loadCRM(companyId)
@ -89,7 +89,7 @@ async function _createTicket(rest, crmPhone, companyId, authentication, crmFirst
rest,
authentication,
crmPhone,
crmFirstName = 'unnamed',
crmFirstName = 'Username',
crmLastName = '',
crmEmail = '',
test = { testing: false },