@trudb/tru-common-lib 0.0.704 → 0.0.705

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -70,7 +70,7 @@ import * as signalR from '@microsoft/signalr';
70
70
  import moment$1 from 'moment';
71
71
  import * as i8 from 'ag-grid-angular';
72
72
  import { AgGridModule } from 'ag-grid-angular';
73
- import { tap, catchError } from 'rxjs/operators';
73
+ import { tap, switchMap, catchError } from 'rxjs/operators';
74
74
  import * as i1$6 from '@angular/router';
75
75
  import { RouterModule } from '@angular/router';
76
76
  import * as i1$7 from '@angular/platform-browser';
@@ -3721,7 +3721,7 @@ class TruAuth {
3721
3721
  login(loginRequest) {
3722
3722
  return this.http
3723
3723
  .post(`${this.baseUrl}${TRU_AUTH_CONFIG.authUrl}/login`, loginRequest)
3724
- .pipe(tap((tokenData) => this.tokenData = tokenData), tap(() => this.http.post(`${this.baseUrl}${TRU_AUTH_CONFIG.authUrl}/user`, this.createUserRequest(loginRequest.username)).pipe(tap((userData) => {
3724
+ .pipe(tap((tokenData) => this.tokenData = tokenData), switchMap(() => this.http.post(`${this.baseUrl}${TRU_AUTH_CONFIG.authUrl}/user`, this.createUserRequest(loginRequest.username)).pipe(tap((userData) => {
3725
3725
  this.auth.doLoginUser(this.tokenData);
3726
3726
  this.user.create(userData);
3727
3727
  this.loggedIn.next(true);