()
| 2104 | ...(demoProfiles[userId] || {}), |
| 2105 | user_id: userId, |
| 2106 | description: body.natural_language || demoProfiles[userId]?.description || "", |
| 2107 | scholar_url: body.scholar_url || demoProfiles[userId]?.scholar_url || "", |
| 2108 | homepage_url: body.homepage_url || demoProfiles[userId]?.homepage_url || "", |
| 2109 | pdf_paths: body.pdf_paths || demoProfiles[userId]?.pdf_paths || [] |
| 2110 | } |
| 2111 | : (demoProfiles[userId] || { user_id: userId, description: "" }); |
| 2112 | const topDirections = Object.entries(raw.core_directions || {}).sort((a, b) => Number(b[1]) - Number(a[1])).slice(0, 8); |
| 2113 | const topTopics = Object.entries(raw.topic_weights || {}).sort((a, b) => Number(b[1]) - Number(a[1])).slice(0, 8); |
| 2114 | return { |
| 2115 | ok: true, |
| 2116 | profile: { |
| 2117 | user_id: raw.user_id, |
no test coverage detected