#37 Fix error in String to Role conversion
This commit is contained in:
@ -205,6 +205,14 @@ export class UserComponent implements OnInit, OnDestroy {
|
|||||||
onUpdateCurrentUser(user: User) {
|
onUpdateCurrentUser(user: User) {
|
||||||
this.currentUsername = this.authenticationService.getUserFromLocalStorage().username;
|
this.currentUsername = this.authenticationService.getUserFromLocalStorage().username;
|
||||||
this.refreshing = true;
|
this.refreshing = true;
|
||||||
|
|
||||||
|
if (user.role == undefined) user.role = this.loggedInUser.role;
|
||||||
|
if (user.active == undefined) user.active = this.loggedInUser.active;
|
||||||
|
if (user.notLocked == undefined) user.notLocked = this.loggedInUser.notLocked;
|
||||||
|
|
||||||
|
console.log(user);
|
||||||
|
console.log(this.loggedInUser);
|
||||||
|
|
||||||
const formData = this.userService.createUserFormData(this.currentUsername, user, this.profileImage);
|
const formData = this.userService.createUserFormData(this.currentUsername, user, this.profileImage);
|
||||||
this.subs.sink = this.userService.updateUser(formData)
|
this.subs.sink = this.userService.updateUser(formData)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
|
|||||||
Reference in New Issue
Block a user