@@ -321,6 +321,15 @@ async function createTeam(req, res) {
321
321
res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
322
322
}
323
323
324
+ try {
325
+ logger . info ( `Creating challenge53 Deployment for team '${ team } '` ) ;
326
+ await createK8sChallenge53DeploymentForTeam ( { team, passcodeHash : hash } ) ;
327
+ logger . info ( `Created challenge53 Deployment for team '${ team } '` ) ;
328
+ } catch ( error ) {
329
+ logger . error ( `Error while creating challenge53 deployment for team ${ team } : ${ error . message } ` ) ;
330
+ res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
331
+ }
332
+
324
333
try {
325
334
logger . info ( `Creating role for virtual desktop in K8s '${ team } '` ) ;
326
335
await createRoleForWebTop ( team ) ;
@@ -364,15 +373,6 @@ async function createTeam(req, res) {
364
373
res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
365
374
}
366
375
367
- try {
368
- logger . info ( `Creating challenge53 Deployment for team '${ team } '` ) ;
369
- await createK8sChallenge53DeploymentForTeam ( { team, passcodeHash : hash } ) ;
370
- logger . info ( `Created challenge53 Deployment for team '${ team } '` ) ;
371
- } catch ( error ) {
372
- logger . error ( `Error while creating challenge53 deployment for team ${ team } : ${ error . message } ` ) ;
373
- res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
374
- }
375
-
376
376
try {
377
377
loginCounter . inc ( { type : 'registration' , userType : 'user' } , 1 ) ;
378
378
@@ -460,6 +460,15 @@ async function createAWSTeam(req, res) {
460
460
res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
461
461
}
462
462
463
+ try {
464
+ logger . info ( `Creating challenge53 Deployment for team '${ team } '` ) ;
465
+ await createK8sChallenge53DeploymentForTeam ( { team, passcodeHash : hash } ) ;
466
+ logger . info ( `Created challenge53 Deployment for team '${ team } '` ) ;
467
+ } catch ( error ) {
468
+ logger . error ( `Error while creating challenge53 deployment for team ${ team } : ${ error . message } ` ) ;
469
+ res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
470
+ }
471
+
463
472
try {
464
473
logger . info ( `Creating role for virtual desktop in AWS '${ team } '` ) ;
465
474
await createRoleForWebTop ( team ) ;
@@ -505,15 +514,6 @@ async function createAWSTeam(req, res) {
505
514
res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
506
515
}
507
516
508
- try {
509
- logger . info ( `Creating challenge53 Deployment for team '${ team } '` ) ;
510
- await createK8sChallenge53DeploymentForTeam ( { team, passcodeHash : hash } ) ;
511
- logger . info ( `Created challenge53 Deployment for team '${ team } '` ) ;
512
- } catch ( error ) {
513
- logger . error ( `Error while creating challenge53 deployment for team ${ team } : ${ error . message } ` ) ;
514
- res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
515
- }
516
-
517
517
try {
518
518
loginCounter . inc ( { type : 'registration' , userType : 'user' } , 1 ) ;
519
519
@@ -591,6 +591,15 @@ async function createAzureTeam(req, res) {
591
591
res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
592
592
}
593
593
594
+ try {
595
+ logger . info ( `Creating challenge53 Deployment for team '${ team } '` ) ;
596
+ await createK8sChallenge53DeploymentForTeam ( { team, passcodeHash : hash } ) ;
597
+ logger . info ( `Created challenge53 Deployment for team '${ team } '` ) ;
598
+ } catch ( error ) {
599
+ logger . error ( `Error while creating challenge53 deployment for team ${ team } : ${ error . message } ` ) ;
600
+ res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
601
+ }
602
+
594
603
try {
595
604
logger . info ( `Creating role for virtual desktop in Azure '${ team } '` ) ;
596
605
await createRoleForWebTop ( team ) ;
@@ -635,14 +644,6 @@ async function createAzureTeam(req, res) {
635
644
logger . error ( `Error while network security policies for team ${ team } : ${ error } ` ) ;
636
645
res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
637
646
}
638
- try {
639
- logger . info ( `Creating challenge53 Deployment for team '${ team } '` ) ;
640
- await createK8sChallenge53DeploymentForTeam ( { team, passcodeHash : hash } ) ;
641
- logger . info ( `Created challenge53 Deployment for team '${ team } '` ) ;
642
- } catch ( error ) {
643
- logger . error ( `Error while creating challenge53 deployment for team ${ team } : ${ error . message } ` ) ;
644
- res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
645
- }
646
647
647
648
try {
648
649
loginCounter . inc ( { type : 'registration' , userType : 'user' } , 1 ) ;
@@ -747,6 +748,15 @@ async function createGCPTeam(req, res) {
747
748
res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
748
749
}
749
750
751
+ try {
752
+ logger . info ( `Creating challenge53 Deployment for team '${ team } '` ) ;
753
+ await createK8sChallenge53DeploymentForTeam ( { team, passcodeHash : hash } ) ;
754
+ logger . info ( `Created challenge53 Deployment for team '${ team } '` ) ;
755
+ } catch ( error ) {
756
+ logger . error ( `Error while creating challenge53 deployment for team ${ team } : ${ error . message } ` ) ;
757
+ res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
758
+ }
759
+
750
760
try {
751
761
logger . info ( `Creating role for virtual desktop in GCP '${ team } '` ) ;
752
762
await createRoleForWebTop ( team ) ;
@@ -791,15 +801,6 @@ async function createGCPTeam(req, res) {
791
801
logger . error ( `Error while network security policies for team ${ team } : ${ error } ` ) ;
792
802
res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
793
803
}
794
- try {
795
- logger . info ( `Creating challenge53 Deployment for team '${ team } '` ) ;
796
- await createK8sChallenge53DeploymentForTeam ( { team, passcodeHash : hash } ) ;
797
- logger . info ( `Created challenge53 Deployment for team '${ team } '` ) ;
798
- } catch ( error ) {
799
- logger . error ( `Error while creating challenge53 deployment for team ${ team } : ${ error . message } ` ) ;
800
- res . status ( 500 ) . send ( { message : 'Failed to Create Instance' } ) ;
801
- }
802
-
803
804
try {
804
805
loginCounter . inc ( { type : 'registration' , userType : 'user' } , 1 ) ;
805
806
0 commit comments