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.

return country with customers

Kiran K98c22aab7c45
diff --git a/apps/web/lib/api/customers/get-customer-or-throw.ts b/apps/web/lib/api/customers/get-customer-or-throw.ts
index 7f707f89e3..1f8f427319 100644
--- a/apps/web/lib/api/customers/get-customer-or-throw.ts
+++ b/apps/web/lib/api/customers/get-customer-or-throw.ts
@@ -15,7 +15,7 @@ export const getCustomerOrThrow = async ({
if (!customer || customer.projectId !== workspaceId) {
throw new DubApiError({
code: "not_found",
- message: "Customer not found",
+ message: "Customer not found.",
});
}
diff --git a/apps/web/lib/zod/schemas/customers.ts b/apps/web/lib/zod/schemas/customers.ts
index 95fee7404e..f18973ce34 100644
--- a/apps/web/lib/zod/schemas/customers.ts
+++ b/apps/web/lib/zod/schemas/customers.ts
@@ -34,6 +34,10 @@ export const CustomerSchema = z.object({
name: z.string().describe("Name of the customer."),
email: z.string().nullish().describe("Email of the customer."),
avatar: z.string().nullish().describe("Avatar URL of the customer."),
+ country: z
+ .string()
+ .nullish()
+ .describe("The 2-letter ISO 3166-1 country code of the customer."),
createdAt: z.date().describe("The date the customer was created."),
});