Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion routes/courses.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ router.post("/add-module", upload.single("file"), async (req, res) => {
userId: session.userId,
organisationId: session.organisation.id,
action: "add_module",
metadata: { moduleId },
metadata: { module_id },
displayMetadata: { "module name": name },
});
return res.status(201).json({
Expand Down
4 changes: 0 additions & 4 deletions routes/onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,10 +479,6 @@ router.post("/responses", async (req, res) => {
[roadmapId, moduleIds[i], i + 1]
);
}

console.log(
`Auto-generated roadmap "${roadmapResult.rows[0].name}" with ${moduleIds.length} modules for user ${user.userId}`
);
}
}
} catch (roadmapError) {
Expand Down
16 changes: 0 additions & 16 deletions routes/roadmaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,24 +578,8 @@ router.post("/generate", async (req, res) => {
ORDER BY matching_skills DESC, channel_match DESC, level_match DESC, random_score
LIMIT 10`; // Limit to top 10 modules

console.log("Generated Query:", query);
console.log("Query Parameters:", params);

const modulesResult = await client.query(query, params);

console.log("Query Results:", modulesResult.rows.length, "modules found");
console.log(
"Module Details:",
modulesResult.rows.map((row) => ({
id: row.id,
matching_skills: row.matching_skills,
channel_match: row.channel_match,
level_match: row.level_match,
channel_id: row.channel_id,
level_id: row.level_id,
}))
);

if (modulesResult.rows.length > 0) {
const moduleIds = modulesResult.rows.map((row) => row.id);

Expand Down