From 5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 16 May 2018 11:00:57 +0200 Subject: Fix typings --- client/src/app/shared/users/user.service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'client/src/app/shared/users') diff --git a/client/src/app/shared/users/user.service.ts b/client/src/app/shared/users/user.service.ts index 4843be618..9fe6c8b60 100644 --- a/client/src/app/shared/users/user.service.ts +++ b/client/src/app/shared/users/user.service.ts @@ -1,9 +1,10 @@ import { catchError, map } from 'rxjs/operators' import { HttpClient } from '@angular/common/http' import { Injectable } from '@angular/core' -import { UserCreate, UserUpdateMe } from '../../../../../shared' +import { UserCreate, UserUpdateMe, UserVideoQuota } from '../../../../../shared' import { environment } from '../../../environments/environment' import { RestExtractor } from '../rest' +import { Avatar } from '../../../../../shared/models/avatars/avatar.model' @Injectable() export class UserService { @@ -41,7 +42,7 @@ export class UserService { changeAvatar (avatarForm: FormData) { const url = UserService.BASE_USERS_URL + 'me/avatar/pick' - return this.authHttp.post(url, avatarForm) + return this.authHttp.post<{ avatar: Avatar }>(url, avatarForm) .pipe(catchError(this.restExtractor.handleError)) } @@ -56,7 +57,7 @@ export class UserService { getMyVideoQuotaUsed () { const url = UserService.BASE_USERS_URL + '/me/video-quota-used' - return this.authHttp.get(url) + return this.authHttp.get(url) .pipe(catchError(res => this.restExtractor.handleError(res))) } -- cgit v1.2.3