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 project -> workspace

Kiran K8332e262c0a3
diff --git a/apps/web/app/api/domains/[domain]/route.ts b/apps/web/app/api/domains/[domain]/route.ts
index 28842f22e1..f231f6d2c1 100644
--- a/apps/web/app/api/domains/[domain]/route.ts
+++ b/apps/web/app/api/domains/[domain]/route.ts
@@ -14,7 +14,7 @@ import { NextResponse } from "next/server";
// GET /api/domains/[domain] – get a project's domain
export const GET = withAuth(async ({ domain, project }) => {
if (isDubDomain(domain) && project.id !== DUB_PROJECT_ID) {
- return new Response("Domain does not belong to project.", {
+ return new Response("Domain does not belong to workspace.", {
status: 403,
});
}
@@ -54,7 +54,7 @@ export const PUT = withAuth(async ({ req, project, domain }) => {
} = await req.json();
if (isDubDomain(domain) && project.id !== DUB_PROJECT_ID) {
- return new Response("Domain does not belong to project.", {
+ return new Response("Domain does not belong to workspace.", {
status: 403,
});
}
@@ -133,7 +133,7 @@ export const PUT = withAuth(async ({ req, project, domain }) => {
// DELETE /api/domains/[domain] - delete a project's domain
export const DELETE = withAuth(async ({ domain, project }) => {
if (isDubDomain(domain) && project.id !== DUB_PROJECT_ID) {
- return new Response("Domain does not belong to project.", {
+ return new Response("Domain does not belong to workspace.", {
status: 403,
});
}
diff --git a/apps/web/app/api/links/[linkId]/transfer/route.ts b/apps/web/app/api/links/[linkId]/transfer/route.ts
index f3768fec21..f845dea3db 100644
--- a/apps/web/app/api/links/[linkId]/transfer/route.ts
+++ b/apps/web/app/api/links/[linkId]/transfer/route.ts
@@ -9,7 +9,7 @@ import { APP_DOMAIN_WITH_NGROK } from "@dub/utils";
import { NextResponse } from "next/server";
const transferLinkBodySchema = z.object({
- newProjectId: z.string().min(1, "Missing new project ID."),
+ newProjectId: z.string().min(1, "Missing new workspace ID."),
});
// POST /api/links/[linkId]/transfer – transfer a link to another project
diff --git a/apps/web/app/api/user/route.ts b/apps/web/app/api/user/route.ts
index 605716175f..b53b24f7be 100644
--- a/apps/web/app/api/user/route.ts
+++ b/apps/web/app/api/user/route.ts
@@ -75,7 +75,7 @@ export const DELETE = withSession(async ({ session }) => {
});
if (userIsOwnerOfProjects.length > 0) {
return new Response(
- "You must transfer ownership of your projects or delete them before you can delete your account.",
+ "You must transfer ownership of your workspaces or delete them before you can delete your account.",
{ status: 422 },
);
} else {
diff --git a/apps/web/emails/clicks-exceeded.tsx b/apps/web/emails/clicks-exceeded.tsx
index c5ac268e20..6ae0f8e5c8 100644
--- a/apps/web/emails/clicks-exceeded.tsx
+++ b/apps/web/emails/clicks-exceeded.tsx
@@ -38,7 +38,7 @@ export default function ClicksExceeded({
<Html>
<Head />
<Preview>
- Your Dub.co project, {name || ""} has exceeded the{" "}
+ Your Dub.co workspace, {name || ""} has exceeded the{" "}
{capitalize(plan) || ""} Plan limit of {nFormatter(usageLimit)} link
clicks/month.
</Preview>
@@ -58,7 +58,7 @@ export default function ClicksExceeded({
Clicks Limit Exceeded
</Heading>
<Text className="text-sm leading-6 text-black">
- Your Dub.co project,{" "}
+ Your Dub.co workspace,{" "}
<Link
href={`https://app.dub.co/${slug}`}
className="text-black underline"
diff --git a/apps/web/emails/domain-deleted.tsx b/apps/web/emails/domain-deleted.tsx
index 4dc476caec..6aeb24ae36 100644
--- a/apps/web/emails/domain-deleted.tsx
+++ b/apps/web/emails/domain-deleted.tsx
@@ -44,7 +44,7 @@ export default function DomainDeleted({
</Heading>
<Text className="text-sm leading-6 text-black">
Your domain <code className="text-purple-600">{domain}</code> for
- your Dub.co project{" "}
+ your Dub.co workspace{" "}
<Link
href={`https://app.dub.co/${projectSlug}`}
className="font-medium text-blue-600 no-underline"
diff --git a/apps/web/emails/invalid-domain.tsx b/apps/web/emails/invalid-domain.tsx
index 5bb64d0743..27947fa96d 100644
--- a/apps/web/emails/invalid-domain.tsx
+++ b/apps/web/emails/invalid-domain.tsx
@@ -46,7 +46,7 @@ export default function InvalidDomain({
</Heading>
<Text className="text-sm leading-6 text-black">
Your domain <code className="text-purple-600">{domain}</code> for
- your Dub.co project{" "}
+ your Dub.co workspace{" "}
<Link
href={`https://app.dub.co/${projectSlug}`}
className="font-medium text-blue-600 no-underline"
diff --git a/apps/web/emails/links-imported.tsx b/apps/web/emails/links-imported.tsx
index e51f0a22cd..43e6e8d6c1 100644
--- a/apps/web/emails/links-imported.tsx
+++ b/apps/web/emails/links-imported.tsx
@@ -88,7 +88,7 @@ export default function LinksImported({
<strong>
imported {Intl.NumberFormat("en-us").format(count)} links
</strong>{" "}
- from {provider} into your Dub.co project,{" "}
+ from {provider} into your Dub.co workspace,{" "}
<Link
href={`https://app.dub.co/${projectSlug}`}
className="font-medium text-blue-600 no-underline"
diff --git a/apps/web/emails/links-limit.tsx b/apps/web/emails/links-limit.tsx
index 8775c7906c..63ed0bbd1c 100644
--- a/apps/web/emails/links-limit.tsx
+++ b/apps/web/emails/links-limit.tsx
@@ -62,7 +62,7 @@ export default function LinksLimitAlert({
Dub.co Links Limit Alert
</Heading>
<Text className="text-sm leading-6 text-black">
- Your Dub.co project,{" "}
+ Your Dub.co workspace,{" "}
<Link
href={`https://app.dub.co/${slug}`}
className="text-black underline"
diff --git a/apps/web/lib/api/links.ts b/apps/web/lib/api/links.ts
index 27f5cd7cf6..3b8a753a05 100644
--- a/apps/web/lib/api/links.ts
+++ b/apps/web/lib/api/links.ts
@@ -359,7 +359,7 @@ export async function processLink({
} else if (!project?.domains?.find((d) => d.slug === domain)) {
return {
link: payload,
- error: "Domain does not belong to project.",
+ error: "Domain does not belong to workspace.",
code: "forbidden",
};
}
diff --git a/apps/web/lib/stripe/index.ts b/apps/web/lib/stripe/index.ts
index a96961becc..eb9fdf18ca 100644
--- a/apps/web/lib/stripe/index.ts
+++ b/apps/web/lib/stripe/index.ts
@@ -24,7 +24,7 @@ export async function cancelSubscription(customer?: string) {
return await stripe.subscriptions.update(subscriptionId, {
cancel_at_period_end: true,
cancellation_details: {
- comment: "Customer deleted their Dub project.",
+ comment: "Customer deleted their Dub workspace.",
},
});
} catch (error) {
diff --git a/apps/web/lib/zod/schemas/links.ts b/apps/web/lib/zod/schemas/links.ts
index 87d2b38555..d1fe36388a 100644
--- a/apps/web/lib/zod/schemas/links.ts
+++ b/apps/web/lib/zod/schemas/links.ts
@@ -86,7 +86,7 @@ export const createLinkBodySchema = z.object({
.string()
.optional()
.describe(
- "The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the project has no domains).",
+ "The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).",
),
key: z
.string()
@@ -205,7 +205,7 @@ export const LinkSchema = z
domain: z
.string()
.describe(
- "The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the project has no domains).",
+ "The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).",
),
key: z
.string()
diff --git a/apps/web/ui/modals/add-project-modal.tsx b/apps/web/ui/modals/add-project-modal.tsx
index 7325cefd58..888c4a8585 100644
--- a/apps/web/ui/modals/add-project-modal.tsx
+++ b/apps/web/ui/modals/add-project-modal.tsx
@@ -291,7 +291,7 @@ function AddProjectModalHelper({
<Button
disabled={slugError || domainError ? true : false}
loading={saving}
- text="Create project"
+ text="Create workspace"
/>
</form>
</Modal>
diff --git a/apps/web/ui/modals/transfer-link-modal.tsx b/apps/web/ui/modals/transfer-link-modal.tsx
index d85d9c0bf0..16cf1d0bd1 100644
--- a/apps/web/ui/modals/transfer-link-modal.tsx
+++ b/apps/web/ui/modals/transfer-link-modal.tsx
@@ -115,7 +115,7 @@ function TransferLinkModal({
selectedItem={selectedProject}
setSelectedItem={setSelectedProject}
inputAttrs={{
- placeholder: "Select a project",
+ placeholder: "Select a workspace",
}}
/>
<Button
diff --git a/apps/web/ui/projects/create-project-button.tsx b/apps/web/ui/projects/create-project-button.tsx
index d2509fd9b3..53a2c3a0cd 100644
--- a/apps/web/ui/projects/create-project-button.tsx
+++ b/apps/web/ui/projects/create-project-button.tsx
@@ -14,7 +14,7 @@ export default function CreateProjectButton() {
return (
<div>
<Button
- text="Create project"
+ text="Create workspace"
disabledTooltip={
exceedingFreeProjects ? (
<TooltipContent