110. Update user service call (#13)

This commit is contained in:
Art
2021-09-12 14:25:10 +03:00
parent aa2aa92085
commit b2dc4088a1

View File

@ -23,6 +23,13 @@ export class UserService {
return this.httpClient
.post<User | HttpErrorResponse>(`${this.host}/user/add`, formData);
}
public updateUser(formData: FormData): Observable<User | HttpErrorResponse> {
let currentUsername = formData.get(`currentUsername`);
return this.httpClient
.put<User | HttpErrorResponse>(`${this.host}/user/${currentUsername}`, formData);
}
}
export interface UserPage {