Skip to content

Commit

Permalink
✨ api: add accessibilityAdjustmentNeeded param to simulator route
Browse files Browse the repository at this point in the history
Co-authored-by: Yannick Francois <[email protected]>
  • Loading branch information
P-Jeremy and yaf authored Nov 26, 2024
1 parent 2ffb860 commit eea3d1d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ async function simulateFlashAssessmentScenario(
challengePickProbability,
variationPercent,
capacity,
accessibilityAdjustmentNeeded,
} = request.payload;

const pickAnswerStatus = dependencies.pickAnswerStatusService.pickAnswerStatusForCapacity(capacity);
Expand All @@ -45,6 +46,7 @@ async function simulateFlashAssessmentScenario(
locale,
initialCapacity,
variationPercent,
accessibilityAdjustmentNeeded,
},
_.isUndefined,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const register = async (server) => {
challengePickProbability: Joi.number().min(0).max(100),
variationPercent: Joi.number().min(0).max(1),
capacity: Joi.number().min(-8).max(8).required(),
accessibilityAdjustmentNeeded: Joi.boolean(),
})
.required(),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ export async function simulateFlashAssessmentScenario({
challengeRepository,
flashAlgorithmService,
sharedFlashAlgorithmConfigurationRepository,
accessibilityAdjustmentNeeded,
}) {
const challenges = await challengeRepository.findActiveFlashCompatible({ locale });
const challenges = await challengeRepository.findActiveFlashCompatible({ locale, accessibilityAdjustmentNeeded });

const configurationUsedInProduction = await sharedFlashAlgorithmConfigurationRepository.getMostRecent();

Expand Down

0 comments on commit eea3d1d

Please sign in to comment.