feat: improve slug readability
(cherry picked from commit d950387f8cc87b166fd24bd75276bf34e1c5daa5)
This commit is contained in:
parent
2856c4013f
commit
08ed8da522
1 changed files with 1 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ const { slugRegex } = useAppConfig()
|
||||||
|
|
||||||
const slugDefaultLength = +useRuntimeConfig().public.slugDefaultLength
|
const slugDefaultLength = +useRuntimeConfig().public.slugDefaultLength
|
||||||
|
|
||||||
export const nanoid = (length: number = slugDefaultLength) => customAlphabet('0123456789abcdefghijklmnopqrstuvwxyz', length)
|
export const nanoid = (length: number = slugDefaultLength) => customAlphabet('23456789abcdefghjkmnpqrstuvwxyz', length)
|
||||||
|
|
||||||
export const LinkSchema = z.object({
|
export const LinkSchema = z.object({
|
||||||
id: z.string().trim().max(26).default(nanoid(10)),
|
id: z.string().trim().max(26).default(nanoid(10)),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue