diff --git a/support-portal-frontend/src/app/model/user.spec.ts b/support-portal-frontend/src/app/model/user.spec.ts new file mode 100644 index 0000000..b270e0e --- /dev/null +++ b/support-portal-frontend/src/app/model/user.spec.ts @@ -0,0 +1,7 @@ +import {User} from './user'; + +describe('User', () => { + it('should create an instance', () => { + expect(new User()).toBeTruthy(); + }); +}); diff --git a/support-portal-frontend/src/app/model/user.ts b/support-portal-frontend/src/app/model/user.ts new file mode 100644 index 0000000..0186df9 --- /dev/null +++ b/support-portal-frontend/src/app/model/user.ts @@ -0,0 +1,15 @@ +export class User { + userId: string; + firstName: string; + lastName: string; + username: string; + email: string; + profileImageUrl: string; + lastLoginDate: Date; + lastLoginDateDisplay: Date; + joinDate: Date; + role: string; //ROLE_USER, ROLE_ADMIN + authorities: string[]; + isActive: boolean; + isNotLocked: boolean; +} diff --git a/support-portal-frontend/src/app/service/authentication.service.ts b/support-portal-frontend/src/app/service/authentication.service.ts index aa9afd5..a45399c 100644 --- a/support-portal-frontend/src/app/service/authentication.service.ts +++ b/support-portal-frontend/src/app/service/authentication.service.ts @@ -15,7 +15,8 @@ export class AuthenticationService { } public login(userDto: UserLogin): Observable | HttpErrorResponse> { - return this.httpClient.post | HttpErrorResponse>(`${this.host}/user/login`, userDto, {observe: 'response'}); + return this.httpClient.post | HttpErrorResponse> + (`${this.host}/user/login`, userDto, {observe: 'response'}); }