Skip to content

Commit

Permalink
Cyberleague: [premieroctet#114] Fix isActionAllowed for next_question…
Browse files Browse the repository at this point in the history
… action
  • Loading branch information
Bastien-Wappizy committed Oct 24, 2024
1 parent 24b4ef6 commit 6ab2c07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/web/server/plugins/cyberleague/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const isActionAllowed = async ({action, dataId, user, ...rest}) => {
if (action == 'smartdiet_next_question') {

//if current answer is not answered
if (!lodash.includes(ANSWERS,score.answers[answerIndex])) {
if (!lodash.includes(lodash.keys(ANSWERS),score.answers[answerIndex].answer)) {
throw new ForbiddenError(`Il faut répondre à la question avant de pouvoir passer à la suivante`)
}

Expand Down

0 comments on commit 6ab2c07

Please sign in to comment.