From 2ceb21d3e4936d866e87e00074c0b2e4928c3d13 Mon Sep 17 00:00:00 2001 From: Hardik-Kumar0005 Date: Fri, 10 Oct 2025 21:32:41 +0530 Subject: [PATCH] [Fix] AvatarUrl handling to correctly fetch the image url from payload --- backend/controllers/user.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/controllers/user.controller.js b/backend/controllers/user.controller.js index 5e5968b..01a1020 100644 --- a/backend/controllers/user.controller.js +++ b/backend/controllers/user.controller.js @@ -4,7 +4,7 @@ import bcrypt from "bcryptjs" import cloudinary from "../lib/cloudinary.js" export const signup = async (req, res) => { - const { email, password, name, profilPic, bio } = req.body + const { email, password, name, profilePic, bio } = req.body try { // Validate input @@ -29,7 +29,7 @@ export const signup = async (req, res) => { email, password: hashedPassword, name, - profilPic: profilPic || "", // Default to empty string if not provided + avatarUrl: profilePic || "", // Default to empty string if not provided bio: bio || "", // Default to empty string if not provided })