Skip to content

Commit 2d41b22

Browse files
committed
✨ mis en place de la deconnexion
1 parent 2fef562 commit 2d41b22

File tree

5 files changed

+3
-6
lines changed

5 files changed

+3
-6
lines changed

src/app/core/guards/user-data.guard.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export class UserDataGuard implements CanActivateChild {
2020
if (! user) {
2121
this.store.dispatch(getCurrentUserAction());
2222
}
23-
console.log(user);
2423
return true;
2524
})
2625
);

src/app/modules/authentication/services/auth.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export class AuthService {
3434
}
3535

3636
public getCurrentUser(): Observable<User> {
37-
console.log('getCurrentUser');
3837
return this.http.get<User>(`${environment.apiUrl}/user/me`);
3938
}
4039

src/app/modules/authentication/store/auth.effects.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,7 @@ export class AuthEffects {
7070
this.actions$.pipe(
7171
ofType(AuthActions.getCurrentUserAction),
7272
switchMap(() => this.authService.getCurrentUser().pipe(
73-
map(({ data }: any) => {
74-
console.log(data);
75-
return AuthActions.fetchCurrentUserSuccessAction({ user: data.user })
76-
}),
73+
map(({ data }: any) => AuthActions.fetchCurrentUserSuccessAction({ user: data.user })),
7774
catchError(() => EMPTY)
7875
))
7976
)

src/app/modules/authentication/store/auth.reducer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const authReducer = createReducer(
2020
AuthActions.authenticateAction,
2121
AuthActions.forgotPasswordAction,
2222
AuthActions.resetPasswordAction,
23+
AuthActions.logoutAction,
2324
(state: AuthState): AuthState => {
2425
return {
2526
...state,

src/app/modules/user/interfaces/user.interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export interface User {
2121
email: string;
2222
phoneNumber: string;
2323
accountType: string;
24+
profilePhotoUrl: string;
2425
timezone: string;
2526
emailVerifiedAt: string;
2627
roles: string[];

0 commit comments

Comments
 (0)