class InnovationAreaAjaxController {

    @GetMapping("/get-innovation-areas/{innovationSectorId}")
    @ResponseBody
    public List<InnovationAreaResource> getInnovationAreas(@PathVariable("innovationSectorId") Long innovationSectorId) {

        if (CompetitionSpecialSectors.isOpenSector().test(innovationSectorId)) {
            List<InnovationAreaResource> returningList = categoryRestService.getInnovationAreasExcludingNone().getSuccess();
            returningList.add(0, createAllInnovationArea());

            return returningList;
        } else {
            return categoryRestService.getInnovationAreasBySector(innovationSectorId).getSuccess();
        }
    }

}