Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
auditLogger.transition = function (originalAgentDataId, meta, agentName, agentConversation, transition, data) {
var userName = getUserName(meta.user)
cql.client.execute('insert into conversationTransitionCausedBy(conversationId,toConversationId,time,userName,agentName,agentStateName,eventName,json) VALUES (?,?,?,?,?,?,?,?)',
[
originalAgentDataId || 'null',
meta.agentDataId || 'null',
new Date(),
userName,
agentName,
agentConversation.state,
transition.causeName,
JSON.stringify(data)
],
{
prepare: true
},
function (err) {
if (err) {
logger.error('transition', err.stack, meta.user)
function useKeyspace (next) {
cql.client.keyspace = keyspace
var query = 'USE ' + keyspace
cql.client.execute(query, next)
},
function createTables (next) {
function useKeyspace (next) {
cql.client.keyspace = keyspace
var query = 'USE ' + keyspace
cql.client.execute(query, next)
},
function createTables (next) {