diff options
author | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-24 15:29:58 +0100 |
---|---|---|
committer | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-24 15:29:58 +0100 |
commit | e85d5ce0be3af95cc1bd9a6ac7a33dff15d086d6 (patch) | |
tree | cec589417982c8e5f47ddfe7936ac54a0fe310ba | |
parent | 9091fe4f92a45bff7adaa841bf8c4a3c498ecadb (diff) | |
parent | 6039920514ea8b929178b4a152c1b6ef33d4632b (diff) |
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into dev
-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; + }); } }); } |