add new lesson mode and started code refraction
This commit is contained in:
@@ -34,6 +34,11 @@ export const getUserStats = async (user) => {
|
||||
}).select('srsLevel');
|
||||
const queueCount = queueItems.length;
|
||||
|
||||
const lessonCount = await StudyItem.countDocuments({
|
||||
userId: userId,
|
||||
srsLevel: 0
|
||||
});
|
||||
|
||||
let hasLowerLevels = false;
|
||||
let lowerLevelCount = 0;
|
||||
if (queueCount > 0) {
|
||||
@@ -94,6 +99,7 @@ export const getUserStats = async (user) => {
|
||||
distribution: dist,
|
||||
forecast: forecast,
|
||||
queueLength: queueCount,
|
||||
lessonCount: lessonCount,
|
||||
hasLowerLevels,
|
||||
lowerLevelCount,
|
||||
heatmap: heatmap,
|
||||
|
||||
Reference in New Issue
Block a user