diff --git a/web-app/src/app/map/controls/export.component.html b/web-app/src/app/map/controls/export.component.html index e93e7bcec..0d7aa39ca 100644 --- a/web-app/src/app/map/controls/export.component.html +++ b/web-app/src/app/map/controls/export.component.html @@ -1,3 +1,3 @@ - diff --git a/web-app/src/app/user/user.service.ts b/web-app/src/app/user/user.service.ts index 1452cd7c7..5cc0fe7fc 100644 --- a/web-app/src/app/user/user.service.ts +++ b/web-app/src/app/user/user.service.ts @@ -1,7 +1,7 @@ import { HttpClient, HttpContext, HttpEvent } from '@angular/common/http' import { Injectable } from '@angular/core' import { Router } from '@angular/router' -import { Observable, Subject } from 'rxjs' +import { Observable, Subject, tap } from 'rxjs' import { LocalStorageService } from '../http/local-storage.service' import { BYPASS_TOKEN } from '../http/token.interceptor' import { User } from 'core-lib-src/user' @@ -96,13 +96,13 @@ export class UserService { } getMyself(): Observable { - const observable = this.httpClient.get('/api/users/myself') - - observable.subscribe((user: any) => { - this.setUser(user) - }) - - return observable + return this.httpClient + .get('/api/users/myself') + .pipe( + tap((user: any) => { + this.setUser(user) + }), + ) } setUser(user: any) {