File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed
apps/builder/app/builder/features/topbar Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -71,18 +71,6 @@ export const AddDomain = ({
71
71
return ;
72
72
}
73
73
74
- if ( cname === "www" ) {
75
- const result = await nativeClient . domain . create . mutate ( {
76
- domain : domain . slice ( "www." . length ) ,
77
- projectId,
78
- } ) ;
79
- if ( result . success === false ) {
80
- toast . error ( result . error ) ;
81
- setError ( result . error ) ;
82
- return ;
83
- }
84
- }
85
-
86
74
onCreate ( domain ) ;
87
75
88
76
await refresh ( ) ;
Original file line number Diff line number Diff line change @@ -155,11 +155,21 @@ export const verify = async (
155
155
domain,
156
156
txtRecord : projectDomain . data . txtRecord ,
157
157
} ) ;
158
-
159
158
if ( createDomainResult . success === false ) {
160
159
return createDomainResult ;
161
160
}
162
161
162
+ // create root certificate along with www
163
+ if ( domain . startsWith ( "www." ) ) {
164
+ const createDomainResult = await context . domain . domainTrpc . create . mutate ( {
165
+ domain : domain . slice ( "www." . length ) ,
166
+ txtRecord : projectDomain . data . txtRecord ,
167
+ } ) ;
168
+ if ( createDomainResult . success === false ) {
169
+ return createDomainResult ;
170
+ }
171
+ }
172
+
163
173
const domainUpdateResult = await context . postgrest . client
164
174
. from ( "Domain" )
165
175
. update ( {
You can’t perform that action at this time.
0 commit comments