Skip to content

Commit

Permalink
small fix for k8senv
Browse files Browse the repository at this point in the history
  • Loading branch information
commjoen committed Nov 26, 2021
1 parent 7a1c43e commit 506dee0
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -19,11 +19,13 @@ public class ChallengesController {
private final String version;
private final ScoreCard scoreCard;
private final List<Challenge> challenges;
private final String k8sEnvironment;

public ChallengesController(@Value("${APP_VERSION}") String version, ScoreCard scoreCard, List<Challenge> challenges) {
public ChallengesController(@Value("${APP_VERSION}") String version, ScoreCard scoreCard, List<Challenge> challenges, @Value("${K8S_ENV}") String k8sEnvironment) {
this.version = version;
this.scoreCard = scoreCard;
this.challenges = challenges;
this.k8sEnvironment = k8sEnvironment;
}

/**
Expand Down Expand Up @@ -58,7 +60,7 @@ public String challenge(Model model, @PathVariable String id) {
model.addAttribute("answerIncorrect", null);
model.addAttribute("solution", null);
model.addAttribute("challengeNumber", challengeNumber(challenge));

model.addAttribute("k8sEnvironment", k8sEnvironment);
includeScoringStatus(model, challenge);
addWarning(challenge, model);

Expand Down

0 comments on commit 506dee0

Please sign in to comment.