Added top bar on all pages. Simplified TTS login component. Fixed some issues. Removed redirects for now.
This commit is contained in:
@ -35,14 +35,20 @@ export class ConnectionCallbackComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
|
||||
this.http.get(`${environment.API_HOST}/auth/connections?token=${params['access_token']}&state=${params['state']}&expires_in=${params['expires_in']}`).subscribe(async (d: any) => {
|
||||
const data = d.data;
|
||||
this.success = true;
|
||||
console.log(params);
|
||||
this.http.get(`${environment.API_HOST}/auth/connections?token=${params['access_token']}&state=${params['state']}&expires_in=${params['expires_in']}`).subscribe({
|
||||
next: async (d: any) => {
|
||||
const data = d.data;
|
||||
this.success = true;
|
||||
|
||||
await setTimeout(async () => {
|
||||
this.client.createConnection(data.connection.name, data.connection.type, data.connection.clientId, params['access_token'], data.connection.grantType, params['scope'], data.expires_at);
|
||||
await this.router.navigate(['connections']);
|
||||
}, 2000)
|
||||
console.log('about to wait for 2 seconds')
|
||||
await setTimeout(async () => {
|
||||
console.log('create connection')
|
||||
this.client.createConnection(data.connection.name, data.connection.type, data.connection.clientId, params['access_token'], data.connection.grantType, params['scope'], data.expires_at);
|
||||
await this.router.navigate(['connections'])
|
||||
}, 2000)
|
||||
},
|
||||
error: async () => await this.router.navigate(['connections'])
|
||||
});
|
||||
;
|
||||
}
|
||||
|
Reference in New Issue
Block a user