Skip to content

Commit

Permalink
feat/itp-339
Browse files Browse the repository at this point in the history
  • Loading branch information
RickyRAV committed May 15, 2024
1 parent e8f82f2 commit bfc5cdd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/historyController.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ const userHistory = async (req, res) => {
// console.log(topFiveTopicsWithCount); // Log the top five topics

// return the top five topics without their occurrence count
const topFiveTopics = sortedTopics.slice(0, 5).map(topic => topic[0]);
const topFiveTopics = sortedTopics.slice(0, 5).map(topic => ({
name: topic[0],
topic_frequency: topic[1]
}));

const totalCount = await prisma.quizzes.count({where: {user_id}});

Expand Down

0 comments on commit bfc5cdd

Please sign in to comment.