-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
ISSUE_NUMBER: GH-25
Description
The getQuestionsByStandard method in model/userModel.js contains console logs that should be removed before deploying to production.
File: repositories/QuestionBankapi/model/userModel.js
Line: 47, 51
Severity: low
Current Behavior
The method logs the standard value and filtered questions to the console.
Expected Behavior
The method should not log any information to the console in production.
Suggested Fix
Remove the console.log statements from the getQuestionsByStandard method.
Code Context
userSchema.methods.getQuestionsByStandard = async function (standard) {
console.log('Standard:', standard); // Log the standard value
const filteredQuestions = await mongoose.model('QuestionBank').find({
_id: { $in: this.questions },
standard: standard,
});
console.log('Filtered Questions:', filteredQuestions); // Log the filtered questions
return filteredQuestions;
};Additional Notes
Console logs can expose sensitive information and impact performance.
Reactions are currently unavailable