diff --git a/src/endpoints/user-authentication-password-profile.js b/src/endpoints/user-authentication-password-profile.js index 78969d3..e8fb5a1 100644 --- a/src/endpoints/user-authentication-password-profile.js +++ b/src/endpoints/user-authentication-password-profile.js @@ -63,8 +63,8 @@ class UserAuthenticationPasswordProfileEndpoint extends CRUDExtend { userAuthenticationInfoId, userAuthenticationPasswordProfileId, body, - accountManagementAuthenticationToken, - token = null + token = null, + accountManagementAuthenticationToken = null ) { return this.request.send( `${this.endpoint @@ -79,10 +79,12 @@ class UserAuthenticationPasswordProfileEndpoint extends CRUDExtend { this, true, 'v2', - { - 'EP-Account-Management-Authentication-Token': - accountManagementAuthenticationToken - } + accountManagementAuthenticationToken + ? { + 'EP-Account-Management-Authentication-Token': + accountManagementAuthenticationToken + } + : {} ) } diff --git a/src/types/user-authentication-password-profile.d.ts b/src/types/user-authentication-password-profile.d.ts index bf31717..abec82a 100644 --- a/src/types/user-authentication-password-profile.d.ts +++ b/src/types/user-authentication-password-profile.d.ts @@ -101,8 +101,8 @@ export interface UserAuthenticationPasswordProfileEndpoint { userAuthenticationInfoId: string, userAuthenticationPasswordProfileId: string, body: { data: UserAuthenticationPasswordProfileUpdateBody }, - accountManagementAuthenticationToken: string, - token?: string + token?: string | null, + accountManagementAuthenticationToken?: string | null ): Promise /** diff --git a/test/unit/user-authentication-password-profile.ts b/test/unit/user-authentication-password-profile.ts index 9c61c56..d98a69e 100644 --- a/test/unit/user-authentication-password-profile.ts +++ b/test/unit/user-authentication-password-profile.ts @@ -89,6 +89,7 @@ describe('User Authentication Password Profile Info', () => { { data: body }, + null, 'dummy-token' ).then(res => { assert.isObject(res)