diff --git a/src/app/profile-page/profile-page.component.spec.ts b/src/app/profile-page/profile-page.component.spec.ts index 31332a5fd7..66351144d5 100644 --- a/src/app/profile-page/profile-page.component.spec.ts +++ b/src/app/profile-page/profile-page.component.spec.ts @@ -219,8 +219,7 @@ describe('ProfilePageComponent', () => { component.setCurrentPasswordValue('current-password'); operations = [ - { op: 'add', path: '/password', value: 'testest' }, - { op: 'add', path: '/challenge', value: 'current-password' } + { "op": "add", "path": "/password", "value": { "password": "testest", "challenge": "current-password" } } ]; result = component.updateSecurity(); }); @@ -244,8 +243,7 @@ describe('ProfilePageComponent', () => { component.setInvalid(false); component.setCurrentPasswordValue('current-password'); operations = [ - { op: 'add', path: '/password', value: 'testest' }, - { op: 'add', path: '/challenge', value: 'current-password' } + { "op": "add", "path": "/password", "value": {"password": "testest", "challenge": "current-password" }} ]; result = component.updateSecurity(); epersonService.patch(user, operations).subscribe((response) => { diff --git a/src/app/profile-page/profile-page.component.ts b/src/app/profile-page/profile-page.component.ts index 15811ee77f..c171502d33 100644 --- a/src/app/profile-page/profile-page.component.ts +++ b/src/app/profile-page/profile-page.component.ts @@ -147,8 +147,7 @@ export class ProfilePageComponent implements OnInit { } if (!this.invalidSecurity && passEntered) { const operations = [ - { op: 'add', path: '/password', value: this.password }, - { op: 'add', path: '/challenge', value: this.currentPassword } + { "op": "add", "path": "/password", "value": { "password": this.password, "challenge": this.currentPassword } } ] as Operation[]; this.epersonService.patch(this.currentUser, operations).pipe(getFirstCompletedRemoteData()).subscribe((response: RemoteData) => { if (response.hasSucceeded) {