🧐 Improve chat session inspection script
This commit is contained in:
@ -22,6 +22,9 @@ const inspectChatSession = async () => {
|
|||||||
where: {
|
where: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
|
select: {
|
||||||
|
state: true,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!chatSession) {
|
if (!chatSession) {
|
||||||
@ -29,7 +32,15 @@ const inspectChatSession = async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(JSON.stringify(chatSession, null, 2))
|
const result = await prisma.result.findFirst({
|
||||||
|
where: {
|
||||||
|
id: (chatSession.state as any).typebotsQueue[0].resultId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log({
|
||||||
|
result,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
inspectChatSession()
|
inspectChatSession()
|
||||||
|
Reference in New Issue
Block a user