Skip to content

Commit

Permalink
Merge pull request #146 from Arquisoft/fix-quality-gate
Browse files Browse the repository at this point in the history
fix quality gate
  • Loading branch information
pelazas authored May 6, 2024
2 parents 9eee00b + 478d4ab commit 1deb7b8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
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

0 comments on commit 1deb7b8

Please sign in to comment.