From c199c427d4ae586339822320f20f512a7a19dc3f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Oct 2018 14:35:31 +0200 Subject: Better typings --- client/src/app/core/auth/auth.service.ts | 2 +- client/src/app/core/server/server.service.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'client/src/app/core') diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts index 5315c8b1d..443772c9e 100644 --- a/client/src/app/core/auth/auth.service.ts +++ b/client/src/app/core/auth/auth.service.ts @@ -221,7 +221,7 @@ export class AuthService { } refreshUserInformation () { - const obj: any = { + const obj: UserLoginWithUsername = { access_token: this.user.getAccessToken(), refresh_token: null, token_type: this.user.getTokenType(), diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index 1663a052c..da8bd26db 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts @@ -154,8 +154,8 @@ export class ServerService { this.localeObservable .pipe( switchMap(translations => { - return this.http.get(ServerService.BASE_VIDEO_URL + attributeName) - .pipe(map((data: any) => ({ data, translations }))) + return this.http.get<{ [id: string]: string }>(ServerService.BASE_VIDEO_URL + attributeName) + .pipe(map(data => ({ data, translations }))) }) ) .subscribe(({ data, translations }) => { -- cgit v1.2.3