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 LinkSchemaExtended to include lastClicked field

Kiran K86a5e869391f
diff --git a/apps/web/lib/zod/schemas/links.ts b/apps/web/lib/zod/schemas/links.ts
index 8da07f9855..a0c26854c0 100644
--- a/apps/web/lib/zod/schemas/links.ts
+++ b/apps/web/lib/zod/schemas/links.ts
@@ -272,7 +272,6 @@ export const LinkSchema = z
.describe("Whether the short link is archived."),
expiresAt: z
.string()
- .datetime()
.nullable()
.describe(
"The date and time when the short link will expire in ISO-8601 format.",
@@ -432,6 +431,7 @@ export const LinkSchemaExtended = LinkSchema.extend({
createdAt: z.date(),
updatedAt: z.date(),
expiresAt: z.date().nullable(),
+ lastClicked: z.date().nullable(),
});
export const getLinksQuerySchemaExtended = getLinksQuerySchema.merge(
diff --git a/apps/web/package.json b/apps/web/package.json
index 7c55c9418b..59cd59247c 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -8,7 +8,7 @@
"lint": "next lint",
"start": "next start",
"script": "tsx ./scripts/run.ts",
- "test": "vitest -no-file-parallelism list-links",
+ "test": "vitest -no-file-parallelism",
"generate-openapi": "tsx ./scripts/generate-openapi.ts"
},
"dependencies": {