2
0

🧐 Improve chat session inspection script

This commit is contained in:
Baptiste Arnaud
2024-05-22 14:59:24 +02:00
parent 8d66b52a39
commit ab9e36f68d

View File

@ -22,6 +22,9 @@ const inspectChatSession = async () => {
where: {
id,
},
select: {
state: true,
},
})
if (!chatSession) {
@ -29,7 +32,15 @@ const inspectChatSession = async () => {
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()