From 6252cc120b5f5d7a004c3f4cd9c65889e9ea0f91 Mon Sep 17 00:00:00 2001 From: Francisco Salas Date: Wed, 18 Nov 2020 15:07:39 +0100 Subject: [PATCH] aw-1686 expand user profile; added put operation --- projects/common/src/fm/models/user.ts | 12 +++++++++++- projects/common/src/fm/services/user.service.ts | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/projects/common/src/fm/models/user.ts b/projects/common/src/fm/models/user.ts index fd41620..e7c8144 100644 --- a/projects/common/src/fm/models/user.ts +++ b/projects/common/src/fm/models/user.ts @@ -3,4 +3,14 @@ export interface IUser { name?: string; email?: string; claims: any; -} + firstName?: string; + lastName?: string; + address?: string; + postalCode?: string; + city?: string; + country?: string; + phone?: string; + mobile?: string; + organisation?: string; + cocNumber?: string; +} \ No newline at end of file diff --git a/projects/common/src/fm/services/user.service.ts b/projects/common/src/fm/services/user.service.ts index fd9e668..d6c7add 100644 --- a/projects/common/src/fm/services/user.service.ts +++ b/projects/common/src/fm/services/user.service.ts @@ -18,4 +18,8 @@ export class UserService { getCurrentUser(): Observable { return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/currentuser`); } + + updateCurrentUser(user: IUser): Observable { + return this.httpClient.put(`${this.ApiEndpoint()}/api/v1/currentuser`, user); + } }