From 5e914a99bfab6984776b8edcc6565747d1debbb6 Mon Sep 17 00:00:00 2001 From: FEARmeR Date: Tue, 23 May 2023 12:49:17 +0100 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=B0=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=D1=81=D1=8F=20=D1=82=D1=8B=20=D1=83=D0=B6=D0=B5!!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LandingPages/Profile/EditProfile.vue | 39 ++++++++++++------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/src/views/LandingPages/Profile/EditProfile.vue b/src/views/LandingPages/Profile/EditProfile.vue index 8199848..afc31d3 100644 --- a/src/views/LandingPages/Profile/EditProfile.vue +++ b/src/views/LandingPages/Profile/EditProfile.vue @@ -80,8 +80,11 @@ const updateProfile = async () => { formData.append(key, value); }); - // Append the image file - formData.append('profile_image', selectedImage.value); + + if (selectedImage.value) { + formData.append('profile_image', selectedImage.value); + }; + await axios.patch(`http://somebodyhire.me/api/profile/${userId.value}/`, formData, { headers }); router.push('/ViewMyProfile'); @@ -104,20 +107,28 @@ onMounted(async() => {

User Profile: {{ loggedUserName }}

- + + + - + + - - - - - - - - - - + + + + + + + + + +
+ + +