resolution merge

This commit is contained in:
Thomas Cardon 2022-03-02 13:46:34 +01:00
commit 9148c51a1f
14 changed files with 279 additions and 12664 deletions

View file

@ -1,4 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { ApiBackService } from 'src/app/services/api-back.service';
import { TokenService } from 'src/app/services/token.service';
@Component({
selector: 'app-favoris-user',
@ -7,9 +9,16 @@ import { Component, OnInit } from '@angular/core';
})
export class FavorisUserComponent implements OnInit {
constructor() { }
personneConnectee : any;
constructor(private apiBackService : ApiBackService,private tokenService : TokenService) { }
ngOnInit(): void {
this.personneConnectee = this.apiBackService.getPersonneById(this.tokenService.getCurrentUserId());
console.log(this.personneConnectee);
}
}

View file

@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { AuthService } from '../../services/auth.service';
@Component({
@ -8,7 +9,8 @@ import { AuthService } from '../../services/auth.service';
})
export class SigninComponent implements OnInit {
public errorForm: boolean;
constructor(private authService: AuthService) {
constructor(private authService: AuthService , private router: Router) {
this.errorForm = false;
}
@ -21,7 +23,9 @@ export class SigninComponent implements OnInit {
const password = submittedForm.form.value['password'];
if(email !== '' && password !== '') {
this.authService.signin(email, password).subscribe(
resp => console.log('Component Page Signin: ', resp)
resp => {console.log('Component Page Signin ', resp)
this.router.navigate(['home'])
}
)
} else {
// afficher une erreur à l'utilisateur