Class AthleteController

java.lang.Object
fr.utc.miage.sporttrack.controller.AthleteController

@Controller @RequestMapping("/athlete") public class AthleteController extends Object
Spring MVC controller for athlete-related pages.

Provides the athlete list view with optional search and badge display.

Author:
SportTrack Team
  • Constructor Details

    • AthleteController

      public AthleteController(AthleteService athleteService, BadgeService badgeService)
      Constructs an AthleteController with the required services.
      Parameters:
      athleteService - the athlete service
      badgeService - the badge service
  • Method Details

    • listAthletes

      @GetMapping("/list") public String listAthletes(@RequestParam(name="q",required=false) String query, org.springframework.ui.Model model, org.springframework.security.core.Authentication authentication)
      Displays the list of all athletes, optionally filtered by a search query. Also includes the three most recent badges per athlete for display.
      Parameters:
      query - the optional search keyword for filtering by username
      model - the Spring MVC model
      authentication - the current security authentication
      Returns:
      the view name "athlete/list"