Merge pull request #28 from fqd511/feature/improve-slug-readability
feat: improve slug readability
This commit is contained in:
commit
ef3e704d79
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('23456789abcdefghjklmnpqrstuvwxyz', 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