Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

update shortkey length

Suraj5eae3bbbfc63
diff --git a/packages/cli/src/commands/shorten.ts b/packages/cli/src/commands/shorten.ts
index cdfbed7ddd..dc7f8f6b48 100644
--- a/packages/cli/src/commands/shorten.ts
+++ b/packages/cli/src/commands/shorten.ts
@@ -31,7 +31,7 @@ export const shorten = new Command()
type: "text",
name: "key",
message: "Enter your Short link:",
- initial: getNanoid(7),
+ initial: getNanoid(),
},
],
{
diff --git a/packages/cli/src/utils/get-nanoid.ts b/packages/cli/src/utils/get-nanoid.ts
index 958424117b..ef0d0d583f 100644
--- a/packages/cli/src/utils/get-nanoid.ts
+++ b/packages/cli/src/utils/get-nanoid.ts
@@ -1,6 +1,6 @@
import { customAlphabet } from "nanoid";
-export function getNanoid(length: number = 10) {
+export function getNanoid(length: number = 7) {
const alphabet =
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
const nanoid = customAlphabet(alphabet, length);