🐛 (share) Enable back empty public ID for self-hosted version

Closes #576
This commit is contained in:
Baptiste Arnaud
2023-07-07 14:35:17 +02:00
parent 5ae6c64d06
commit 56078b4e02
8 changed files with 32 additions and 20 deletions

View File

@@ -94,7 +94,14 @@ const getTypebotFromPublicId = async (
const publishedTypebot = await prisma.publicTypebot.findFirst({
where: { typebot: { publicId: publicId ?? '' } },
include: {
typebot: { select: { name: true, isClosed: true, isArchived: true } },
typebot: {
select: {
name: true,
isClosed: true,
isArchived: true,
publicId: true,
},
},
},
})
if (isNotDefined(publishedTypebot)) return null