diff --git a/controllers/linkedin.js b/controllers/linkedin.js index 816bcfa..5dda918 100644 --- a/controllers/linkedin.js +++ b/controllers/linkedin.js @@ -92,8 +92,8 @@ const getUserProfile = async (req, res) => { }; const scrapeLinkedInProfile = async (user) => { - const img = user.img; - const useremail = user.email; + const UserImg = user.img; + const UserEmail = user.email; const profileUrl = user.linkedinUrl; console.log("Scraping LinkedIn profile:", profileUrl); @@ -160,9 +160,9 @@ const scrapeLinkedInProfile = async (user) => { ); return { - img: user.img || null, - email: user.email || null, - linkedinUrl: user.linkedinUrl || null, + img: UserImg || null, + email: UserEmail || null, + linkedinUrl: profileUrl || null, name: getText("h1"), headline: getText("div.text-body-medium.break-words"),