diff --git a/server/setup/copyInConfig.ts b/server/setup/copyInConfig.ts
index 772ceec8..376a5df4 100644
--- a/server/setup/copyInConfig.ts
+++ b/server/setup/copyInConfig.ts
@@ -63,7 +63,7 @@ async function copyInDomains() {
if (existingDomainKeys.has(domainId)) {
await trx
.update(domains)
- .set({ baseDomain })
+ .set({ baseDomain, verified: true, type: "wildcard" })
.where(eq(domains.domainId, domainId))
.execute();
} else {
diff --git a/src/components/DomainPicker.tsx b/src/components/DomainPicker.tsx
index d46db5e9..18d992fc 100644
--- a/src/components/DomainPicker.tsx
+++ b/src/components/DomainPicker.tsx
@@ -21,6 +21,7 @@ import { AxiosResponse } from "axios";
import { cn } from "@/lib/cn";
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { useTranslations } from "next-intl";
+import { build } from "@server/build";
type OrganizationDomain = {
domainId: string;
@@ -95,7 +96,9 @@ export default function DomainPicker({
const domains = response.data.data.domains
.filter(
(domain) =>
- domain.type === "ns" || domain.type === "cname" || domain.type === "wildcard"
+ domain.type === "ns" ||
+ domain.type === "cname" ||
+ domain.type === "wildcard"
)
.map((domain) => ({
...domain,
@@ -198,7 +201,7 @@ export default function DomainPicker({
-(baseDomainLower.length + 1)
);
// Only allow one level up (no dots in subdomain)
- if (!subdomain.includes('.')) {
+ if (!subdomain.includes(".")) {
options.push({
id: `org-${orgDomain.domainId}`,
domain: userInput,
@@ -220,7 +223,7 @@ export default function DomainPicker({
domain: option.fullDomain,
type: "provided",
domainNamespaceId: option.domainNamespaceId,
- domainId: option.domainId,
+ domainId: option.domainId
});
});
@@ -277,8 +280,8 @@ export default function DomainPicker({
type: "organization",
subdomain: option.subdomain || undefined,
fullDomain: option.domain,
- baseDomain: option.subdomain
- ? option.domain.split('.').slice(1).join('.')
+ baseDomain: option.subdomain
+ ? option.domain.split(".").slice(1).join(".")
: option.domain
});
}
@@ -339,9 +342,11 @@ export default function DomainPicker({
{t("domainPickerTabOrganization")}
-
- {t("domainPickerTabProvided")}
-
+ {build == "saas" && (
+
+ {t("domainPickerTabProvided")}
+
+ )}