diff options
-rw-r--r-- | backend/api/api/Services/AuthService.cs | 1 | ||||
-rw-r--r-- | frontend/src/app/_modals/login-modal/login-modal.component.ts | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/backend/api/api/Services/AuthService.cs b/backend/api/api/Services/AuthService.cs index 8ef96e2e..a646cc9d 100644 --- a/backend/api/api/Services/AuthService.cs +++ b/backend/api/api/Services/AuthService.cs @@ -36,6 +36,7 @@ namespace api.Services u.Password = PasswordCrypt.hashPassword(user.password); u.FirstName = user.firstName; u.LastName = user.lastName; + u.photoId = "1"; if (_users.Find(user => user.Username == u.Username).FirstOrDefault() != null) return "Username Already Exists"; if (_users.Find(user => user.Email == u.Email).FirstOrDefault() != null) diff --git a/frontend/src/app/_modals/login-modal/login-modal.component.ts b/frontend/src/app/_modals/login-modal/login-modal.component.ts index 1b634c9a..c86c269a 100644 --- a/frontend/src/app/_modals/login-modal/login-modal.component.ts +++ b/frontend/src/app/_modals/login-modal/login-modal.component.ts @@ -2,6 +2,8 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { CookieService } from 'ngx-cookie-service'; import { AuthService } from 'src/app/_services/auth.service'; +import { UserInfoService } from 'src/app/_services/user-info.service'; +import shared from '../../Shared'; @Component({ selector: 'app-login-modal', @@ -18,7 +20,8 @@ export class LoginModalComponent implements OnInit { constructor( private authService: AuthService, private cookie: CookieService, - private router: Router + private router: Router, + private userInfoService: UserInfoService ) { } ngOnInit(): void { @@ -36,6 +39,9 @@ export class LoginModalComponent implements OnInit { else { this.authService.authenticate(response); (<HTMLSelectElement>document.getElementById('closeButton')).click(); + this.userInfoService.getUserInfo().subscribe((response) => { + shared.photoId = response.photoId; + }); } }); } |