2
0

🐛 (results) Fix results still appearing when deleted

Closes #316
This commit is contained in:
Baptiste Arnaud
2023-02-13 14:28:44 +01:00
parent 0dba994210
commit 3728bca173
5 changed files with 10 additions and 36 deletions

View File

@ -23,17 +23,20 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
prisma.result.count({
where: {
typebotId: typebot.id,
isArchived: false,
},
}),
prisma.result.count({
where: {
typebotId: typebot.id,
isArchived: false,
hasStarted: true,
},
}),
prisma.result.count({
where: {
typebotId: typebot.id,
isArchived: false,
isCompleted: true,
},
}),