refactor user api
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Francisco Salas 2021-02-15 11:03:24 +01:00
parent 3f6863845b
commit 3242058c4f

View File

@ -16,10 +16,10 @@ export class UserService {
} }
getCurrentUser(): Observable<IUser> { getCurrentUser(): Observable<IUser> {
return this.httpClient.get<IUser>(`${this.ApiEndpoint()}/api/v1/currentuser`); return this.httpClient.get<IUser>(`${this.ApiEndpoint()}/api/v1/users/currentuser`);
} }
updateCurrentUser(user: IUser): Observable<IUser> { updateCurrentUser(user: IUser): Observable<IUser> {
return this.httpClient.put<IUser>(`${this.ApiEndpoint()}/api/v1/currentuser`, user); return this.httpClient.put<IUser>(`${this.ApiEndpoint()}/api/v1/users/${user.code}`, user);
} }
} }