fix: changed default text to username and surname
parent
e2372fad37
commit
e76cf69f3f
|
@ -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]
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 })
|
||||
|
|
|
@ -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 },
|
||||
|
|
Loading…
Reference in New Issue