Skip to content

Commit

Permalink
EPMRPP-97474 || Update request for deleting user avatar (#4159)
Browse files Browse the repository at this point in the history
* EPMRPP-97474 || Update request for deleting user avatar

* EPMRPP-97474 || Code Review fix - 1

* EPMRPP-97474 || Code Review fix - 1
  • Loading branch information
BlazarQSO authored Jan 16, 2025
1 parent 7b23411 commit db24a6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ export class PersonalInfoBlock extends Component {
accountType={accountType}
uploadNewImage={this.uploadNewImage}
removeImage={this.removeImage}
userId={userId}

Check failure on line 220 in app/src/pages/inside/profilePage/personalInfoBlock/personalInfoBlock.jsx

View workflow job for this annotation

GitHub Actions / build (20)

'userId' is not defined
/>
)}
{accountType === INTERNAL && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export class PhotoControls extends Component {
showModalAction: PropTypes.func.isRequired,
showNotification: PropTypes.func.isRequired,
setPhotoTimeStampAction: PropTypes.func.isRequired,
userId: PropTypes.string.isRequired,
tracking: PropTypes.shape({
trackEvent: PropTypes.func,
getTrackingData: PropTypes.func,
Expand Down Expand Up @@ -166,7 +167,7 @@ export class PhotoControls extends Component {
}
};
removeImageHandler = () => {
fetch(URLS.dataPhoto(), { method: 'delete' })
fetch(URLS.userAvatar(this.props.userId), { method: 'delete' })
.then(() => {
this.props.removeImage();
this.props.setPhotoTimeStampAction(Date.now());
Expand Down

0 comments on commit db24a6c

Please sign in to comment.