Skip to content

Commit

Permalink
Cyberleague: [premieroctet#159] Define expectedAnswer in statistic.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien-Wappizy committed Oct 8, 2024
1 parent c3cccd9 commit 72c906f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion backend/web/server/plugins/cyberleague/statistic.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const lodash = require('lodash')
const Company = require("../../models/Company")
const Score = require("../../models/Score")
const User = require("../../models/User")
const { STAT_MIN_SCORES } = require("./consts")
const { STAT_MIN_SCORES, ANSWER_NO, ANSWER_YES } = require("./consts")


const regexTest = (field, text) => {
Expand All @@ -26,6 +26,23 @@ const regexTest = (field, text) => {
}

const getIncreaseValue = (field, answer) => {
const expectedAnswer = {
securityIncidentManagement: ANSWER_NO, //for example
partner: ANSWER_YES, // for example
inventory: 'todo',
insurance: 'todo',
cyberRef: 'todo',
intrusion: 'todo',
externalized: 'todo',
webApp: 'todo',
antivirus: 'todo',
charter: 'todo',
financial: 'todo',
sensibilization: 'todo',
mfa: 'todo',
admin: 'todo',
}

//tester en fonction de si on veut answer_yes ou answer_no selon le champ
}

Expand Down

0 comments on commit 72c906f

Please sign in to comment.