🚸 (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:
Baptiste Arnaud
2023-01-20 11:20:11 +01:00
parent fe2952d407
commit 0febaf9760
9 changed files with 68 additions and 29 deletions

View File

@@ -9,7 +9,7 @@ export const canWriteTypebots = (
user: Pick<User, 'email' | 'id'>
): Prisma.TypebotWhereInput =>
isNotEmpty(env('E2E_TEST'))
? {}
? { id: typeof typebotIds === 'string' ? typebotIds : { in: typebotIds } }
: {
id: typeof typebotIds === 'string' ? typebotIds : { in: typebotIds },
OR: [