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.

Merge branch 'main' into project-to-workspace

Kiran Ke98d37d9c917
diff --cc apps/web/app/admin.dub.co/components/impersonate-user.tsx
index 3c259e03bf,3e7a98d97f..03388154eb
--- a/apps/web/app/admin.dub.co/components/impersonate-user.tsx
+++ b/apps/web/app/admin.dub.co/components/impersonate-user.tsx
@@@ -29,10 -34,10 +34,10 @@@ export default function ImpersonateUser
</form>
{data && (
<form
- action={(formData) => {
+ action={async (formData) => {
if (
!confirm(
- `This will ban the user ${data.email} and delete all their projects and links. Are you sure?`,
+ `This will ban the user ${data.email} and delete all their workspaces and links. Are you sure?`,
)
) {
return;
diff --cc apps/web/lib/zod/index.ts
index b9ca34a5a8,6cc3bd5c4b..057a09b53c
--- a/apps/web/lib/zod/index.ts
+++ b/apps/web/lib/zod/index.ts
@@@ -6,6 -7,8 +7,8 @@@ extendZodWithOpenApi(z)
export default z;
export const domainKeySchema = z.object({
- domain: z.string().min(1),
+ domain: z.string().refine((v) => validDomainRegex.test(v), {
+ message: "Invalid domain format",
+ }),
key: z.string().min(1),
-});
+});
diff --cc apps/web/ui/modals/accept-invite-modal.tsx
index 32a39bf494,4f47f88b9f..a1ded3b56e
--- a/apps/web/ui/modals/accept-invite-modal.tsx
+++ b/apps/web/ui/modals/accept-invite-modal.tsx
@@@ -58,10 -58,10 +58,10 @@@ function AcceptInviteModal(
await Promise.all([
mutate("/api/projects"),
mutate(`/api/projects/${slug}`),
- mutate(`/api/projects/${slug}/domains`),
+ mutate(`/api/domains?projectSlug=${slug}`),
]);
setShowAcceptInviteModal(false);
- toast.success("You now are a part of this project!");
+ toast.success("You now are a part of this workspace!");
});
}}
disabled={accepting}