File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
src/routes/(console)/organization-[organization]/domains Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 16
16
Input ,
17
17
InteractiveText
18
18
} from ' @appwrite.io/pink-svelte' ;
19
+ import { base } from ' $app/paths' ;
20
+ import { page } from ' $app/state' ;
21
+ import { goto } from ' $app/navigation' ;
19
22
20
23
export let domain: Domain ;
21
24
22
25
let verified = undefined ;
23
26
27
+ const routeBase = ` ${base }/organization-${page .params .organization }/domains/domain-${domain .$id } ` ;
28
+
24
29
// TODO: split _APP_DOMAINS_NAMESERVERS?
25
- let nameservers = $consoleVariables ?._APP_DOMAINS_NAMESERVERS .split (' ,' ) ?? [
30
+ const nameservers = $consoleVariables ?._APP_DOMAINS_NAMESERVERS .split (' ,' ) ?? [
26
31
' ns1.appwrite.io' ,
27
32
' ns2.appwrite.io'
28
33
];
31
36
try {
32
37
domain = await sdk .forConsole .domains .updateNameservers (domain .$id );
33
38
verified = domain .nameservers === ' Appwrite' ;
39
+ if (verified ) {
40
+ addNotification ({
41
+ type: ' success' ,
42
+ message: ' Domain verified'
43
+ });
44
+
45
+ await goto (routeBase );
46
+ } else {
47
+ addNotification ({
48
+ type: ' error' ,
49
+ message: ' Domain not verified'
50
+ });
51
+ }
34
52
} catch (error ) {
35
53
addNotification ({
36
54
type: ' error' ,
Original file line number Diff line number Diff line change 13
13
14
14
export let show = false ;
15
15
export let selectedDomain: Domain ;
16
- let nameservers = $consoleVariables ?._APP_DOMAINS_NAMESERVERS .split (' ,' ) ?? [
16
+ const nameservers = $consoleVariables ?._APP_DOMAINS_NAMESERVERS .split (' ,' ) ?? [
17
17
' ns1.appwrite.io' ,
18
18
' ns2.appwrite.io'
19
19
];
You can’t perform that action at this time.
0 commit comments