From 10a4896a17495548ed3ce6b333939203b698470b Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 7 Apr 2021 21:22:43 +0300 Subject: Updated profile settings page to use profile picture service --- src/app/components/profile-settings/profile-settings.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/app') diff --git a/src/app/components/profile-settings/profile-settings.component.ts b/src/app/components/profile-settings/profile-settings.component.ts index f329942..3d6e491 100644 --- a/src/app/components/profile-settings/profile-settings.component.ts +++ b/src/app/components/profile-settings/profile-settings.component.ts @@ -14,6 +14,7 @@ import { Technology } from 'src/models/technology.model'; import { TokenService } from 'src/app/services/token.service'; import { Title } from '@angular/platform-browser'; import { AppConstants } from 'src/app/app-constants.module'; +import { ProfilePictureService } from 'src/app/services/profile-picture.service'; @Component({ selector: 'app-profile-settings', @@ -40,7 +41,7 @@ export class ProfileSettingsComponent implements OnInit { public availableTechnologies: Technology[]; public showCurrentPassword = false; - constructor(private _titleService: Title, private _router: Router, private _userService: UserService, private _languageService: LanguageService, private _technologyService: TechnologyService, private _tokenService: TokenService, private _fb: FormBuilder, private _location: Location) { + constructor(private _titleService: Title, private _router: Router, private _userService: UserService, private _profilePictureService: ProfilePictureService, private _languageService: LanguageService, private _technologyService: TechnologyService, private _tokenService: TokenService, private _fb: FormBuilder, private _location: Location) { this._titleService.setTitle(this._title); } @@ -187,7 +188,7 @@ export class ProfileSettingsComponent implements OnInit { return; } - this._userService.putProfilePictureFromSessionStorageRequest(this.newProfilePicture).subscribe({ + this._profilePictureService.putPictureWithSessionStorageRequest(this.newProfilePicture).subscribe({ next: () => { this.reloadPage(); } -- cgit v1.2.3