This repository was archived by the owner on Apr 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-25
lines changed Expand file tree Collapse file tree 2 files changed +3
-25
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,7 @@ export const changeUserInformation = (userWithNewInformation: UserInformation):
24
24
resolve ( response . data )
25
25
} )
26
26
. catch ( ( error ) => {
27
- console . log ( "[userInformation.ts] " + error ) ;
28
- reject ( error ) ;
27
+ reject ( error . response ?. data ?. message ) ;
29
28
} ) ;
30
29
} )
31
30
} ;
Original file line number Diff line number Diff line change @@ -66,32 +66,11 @@ export default function Profile(): ReactElement {
66
66
handleAlertVisibility ( DEFAULT_ALERT_DURATION , "success" , "Worked: " + ( res ) ) ;
67
67
} )
68
68
. catch ( err => {
69
- handleAlertVisibility ( DEFAULT_ALERT_DURATION , "danger" , "Error: " + ( err . outputMessage ? err . outputMessage : ( err . httpStatus + " " + err . httpMessage ) ) )
69
+ console . log ( "Error:" + err )
70
+ handleAlertVisibility ( DEFAULT_ALERT_DURATION , "danger" , "Error: " + err )
70
71
} )
71
72
}
72
73
73
- /*function EditProfile(): ReactElement {
74
- return (
75
- <Form>
76
- <Form.Group controlId="editProfileForm-Username">
77
- <Form.Label>Your Username</Form.Label>
78
- <Form.Control type="text" placeholder="Enter username" defaultValue={user.username ?? ""}/>
79
- <Form.Text>
80
- Your username will be visible to anyone using this system.
81
- </Form.Text>
82
- </Form.Group>
83
- <Form.Group controlId="editProfileForm.Password">
84
- <Form.Label>New Password</Form.Label>
85
- <Form.Control type="password" placeholder="New Password"/>
86
- </Form.Group>
87
- <Form.Group controlId="editProfileForm.PasswordConfirmation">
88
- <Form.Label>Repeat new Password</Form.Label>
89
- <Form.Control type="password" placeholder="New Password"/>
90
- </Form.Group>
91
- </Form>
92
- )
93
- }*/
94
-
95
74
function EditProfile ( ) : ReactElement {
96
75
return (
97
76
< >
You can’t perform that action at this time.
0 commit comments