class ApplicationCreationAuthenticatedController {

    @GetMapping("/{competitionId}")
    public String view(Model model,
                       @PathVariable(COMPETITION_ID) long competitionId,
                       UserResource user,
                       HttpServletResponse response) {
        Boolean userHasApplication = userService.userHasApplicationForCompetition(user.getId(), competitionId);

        if (Boolean.TRUE.equals(userHasApplication)) {
            model.addAttribute(COMPETITION_ID, competitionId);
            model.addAttribute(FORM_NAME, new ApplicationCreationAuthenticatedForm());
            return "create-application/confirm-new-application";
        } else {
            return redirectToOrganisationCreation(competitionId, response);
        }
    }

}