File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,28 +27,28 @@ const controller = {
2727 store . loaded ( ) ;
2828 } ) . catch ( ( ) => {
2929 } ) ;
30- data . get ( `${ Project . api } organisations/${ id } /invite-links/` ) . then ( ( links ) => {
31- store . model . inviteLinks = links ;
32- if ( ! links || ! links . length ) {
33- Promise . all ( [
34- data . post ( `${ Project . api } organisations/${ id } /invite-links/` , {
35- role : 'ADMIN' ,
36- } ) ,
37- data . post ( `${ Project . api } organisations/${ id } /invite-links/` , {
38- role : 'USER' ,
39- } ) ,
40- ] ) . then ( ( ) => {
41- data . get ( `${ Project . api } organisations/${ id } /invite-links/` ) . then ( ( links ) => {
42- store . model . inviteLinks = links ;
30+ }
31+ data . get ( `${ Project . api } organisations/${ id } /invite-links/` ) . then ( ( links ) => {
32+ store . model . inviteLinks = links ;
33+ if ( ! links || ! links . length ) {
34+ Promise . all ( [
35+ data . post ( `${ Project . api } organisations/${ id } /invite-links/` , {
36+ role : 'ADMIN' ,
37+ } ) ,
38+ data . post ( `${ Project . api } organisations/${ id } /invite-links/` , {
39+ role : 'USER' ,
40+ } ) ,
41+ ] ) . then ( ( ) => {
42+ data . get ( `${ Project . api } organisations/${ id } /invite-links/` ) . then ( ( links ) => {
43+ store . model . inviteLinks = links ;
4344
44- store . loaded ( ) ;
45- } ) ;
45+ store . loaded ( ) ;
4646 } ) ;
47- } else {
48- store . loaded ( ) ;
49- }
50- } ) ;
51- }
47+ } ) ;
48+ } else {
49+ store . loaded ( ) ;
50+ }
51+ } ) ;
5252
5353 return Promise . all ( projects . map ( ( project , i ) => data . get ( `${ Project . api } environments/?project=${ project . id } ` )
5454 . then ( ( res ) => {
You can’t perform that action at this time.
0 commit comments