From db24a6c39dac532ad3675b22726123fc7d2139e4 Mon Sep 17 00:00:00 2001 From: Iukou Siarhei <45054016+BlazarQSO@users.noreply.github.com> Date: Thu, 16 Jan 2025 17:02:26 +0300 Subject: [PATCH] EPMRPP-97474 || Update request for deleting user avatar (#4159) * EPMRPP-97474 || Update request for deleting user avatar * EPMRPP-97474 || Code Review fix - 1 * EPMRPP-97474 || Code Review fix - 1 --- .../inside/profilePage/personalInfoBlock/personalInfoBlock.jsx | 1 + .../personalInfoBlock/photoControls/photoControls.jsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/pages/inside/profilePage/personalInfoBlock/personalInfoBlock.jsx b/app/src/pages/inside/profilePage/personalInfoBlock/personalInfoBlock.jsx index 5ef339fafd..09eea38f13 100644 --- a/app/src/pages/inside/profilePage/personalInfoBlock/personalInfoBlock.jsx +++ b/app/src/pages/inside/profilePage/personalInfoBlock/personalInfoBlock.jsx @@ -217,6 +217,7 @@ export class PersonalInfoBlock extends Component { accountType={accountType} uploadNewImage={this.uploadNewImage} removeImage={this.removeImage} + userId={userId} /> )} {accountType === INTERNAL && ( diff --git a/app/src/pages/inside/profilePage/personalInfoBlock/photoControls/photoControls.jsx b/app/src/pages/inside/profilePage/personalInfoBlock/photoControls/photoControls.jsx index 49df8aec53..4a2f6057ca 100644 --- a/app/src/pages/inside/profilePage/personalInfoBlock/photoControls/photoControls.jsx +++ b/app/src/pages/inside/profilePage/personalInfoBlock/photoControls/photoControls.jsx @@ -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, @@ -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());