File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
frontend/javascripts/admin/account Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,17 @@ function AccountPasswordView({ history }: Props) {
24
24
function onFinish ( formValues : Record < string , any > ) {
25
25
Request . sendJSONReceiveJSON ( "/api/auth/changePassword" , {
26
26
data : formValues ,
27
- } ) . then ( async ( ) => {
28
- Toast . success ( messages [ "auth.reset_pw_confirmation" ] ) ;
29
- await Request . receiveJSON ( "/api/auth/logout" ) ;
30
- history . push ( "/auth/login" ) ;
31
- Store . dispatch ( logoutUserAction ( ) ) ;
32
- } ) ;
27
+ } )
28
+ . then ( async ( ) => {
29
+ Toast . success ( messages [ "auth.reset_pw_confirmation" ] ) ;
30
+ await Request . receiveJSON ( "/api/auth/logout" ) ;
31
+ history . push ( "/auth/login" ) ;
32
+ Store . dispatch ( logoutUserAction ( ) ) ;
33
+ } )
34
+ . catch ( ( error ) => {
35
+ console . error ( "Password change failed:" , error ) ;
36
+ Toast . error ( "Failed to change password. Please try again." ) ;
37
+ } ) ;
33
38
}
34
39
35
40
function checkPasswordsAreMatching ( value : string , otherPasswordFieldKey : string [ ] ) {
You can’t perform that action at this time.
0 commit comments