2
0

fix(viewer): 🐛 Make custom domain fetching more predictable

This commit is contained in:
Baptiste Arnaud
2022-05-02 07:24:24 -07:00
parent 28710dddc7
commit 8fdfda6482
2 changed files with 10 additions and 6 deletions

View File

@ -50,7 +50,7 @@ const getTypebotFromPublicId = async (publicId?: string) => {
const getTypebotFromCustomDomain = async (customDomain: string) => {
const typebot = await prisma.publicTypebot.findFirst({
where: { customDomain: { contains: customDomain } },
where: { customDomain },
})
if (isNotDefined(typebot)) return null
return omit(typebot as unknown as PublicTypebot, 'createdAt', 'updatedAt')