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 }}

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