Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #147

Merged
merged 2 commits into from
May 6, 2024
Merged

Dev #147

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 game/groupservice/GroupController.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ let GroupController = {

async function getGroupByName(name) {
try {
const group = await Group.findOne({ groupName: name });
const group = await Group.findOne({ groupName: name.toString() });
if (!group) {
throw new Error('This group does not exist');
}
Expand Down
2 changes: 1 addition & 1 deletion game/qgservice/QGController.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ let QGController = {
const { ids } = req.body;
const questions = [];
for (const id of ids) {
const question = await Question4Answers.find({uuid: id})
const question = await Question4Answers.find({uuid: id.toString()})
questions.push(question);
}
res.json(questions);
Expand Down
4 changes: 2 additions & 2 deletions game/qgservice/generatorLogic/MathQuestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ function generateRandomMathQuestion() {
};
}

async function createMathQuestions(numberOfQuestions, lang) {
async function createMathQuestions(numberOfQuestions) {
const questions = [];

for (let i = 0; i < numberOfQuestions; i++) {
const mathQuestion = generateRandomMathQuestion(lang);
const mathQuestion = generateRandomMathQuestion();
questions.push(mathQuestion);
}

Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sonar.language=js
sonar.projectName=wiq_en2a

sonar.coverage.exclusions=**/*.test.js
sonar.sources=webapp/src/components,users/authservice,users/userservice,gatewayservice,game/gameservice,game/groupservice,game/qgservice,multiplayerservice
sonar.sources=webapp/src/components,users/authservice,users/userservice,gatewayservice,game/gameservice,game/groupservice,game/qgservice
sonar.sourceEncoding=UTF-8
sonar.exclusions=node_modules/**
sonar.javascript.lcov.reportPaths=**/coverage/lcov.info