🚸 (publish) Improve invalid public ID feedback
Also remove the 4 char min length rule for self-hosted versions Closes #267
This commit is contained in:
@ -62,9 +62,8 @@ export const getServerSideProps: GetServerSideProps = async (
|
||||
const getTypebotFromPublicId = async (
|
||||
publicId?: string
|
||||
): Promise<TypebotPageProps['publishedTypebot'] | null> => {
|
||||
if (!publicId) return null
|
||||
const publishedTypebot = await prisma.publicTypebot.findFirst({
|
||||
where: { typebot: { publicId } },
|
||||
where: { typebot: { publicId: publicId ?? '' } },
|
||||
include: {
|
||||
typebot: { select: { name: true, isClosed: true, isArchived: true } },
|
||||
},
|
||||
|
@ -52,9 +52,8 @@ export const getServerSideProps: GetServerSideProps = async (
|
||||
const getTypebotFromPublicId = async (
|
||||
publicId?: string
|
||||
): Promise<TypebotPageV2Props['typebot'] | null> => {
|
||||
if (!publicId) return null
|
||||
const typebot = (await prisma.typebot.findUnique({
|
||||
where: { publicId },
|
||||
where: { publicId: publicId ?? '' },
|
||||
select: {
|
||||
theme: true,
|
||||
name: true,
|
||||
|
Reference in New Issue
Block a user