Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async changePassword(username: string, currentPassword: Nested | FormValue, newPassword: Nested | FormValue) {
try {
await services.accounts.changePassword(username, currentPassword, newPassword);
this.appContext.apis.notifications.show({type: NotificationType.Success, content: 'Your password has been successfully updated.'});
this.showChangePassword = false;
} catch (e) {
this.appContext.apis.notifications.show({
content: ,
type: NotificationType.Error
});
}
}