Esempio n. 1
0
        public async Task <ActionResult <IEnumerable <WorkoutDto> > > GetWorkouts([FromQuery] WorkoutParams workoutParams)
        {
            workoutParams.UserId = User.GetUserId();
            var workouts = await _workoutService.GetWorkoutDtos(workoutParams);

            Response.AddPaginationHeader(workouts.TotalItems, workouts.ItemsPerPage, workouts.PageNumber, workouts.TotalPages);
            return(workouts);
        }
Esempio n. 2
0
 public async Task <PagedList <WorkoutResponse> > GetWorkoutResponsesAsync(WorkoutParams workoutParams)
 {
     return(await _workoutRepo.GetWorkoutResponsesAsync(workoutParams));
 }
Esempio n. 3
0
 public Task <PagedList <WorkoutDto> > GetWorkoutDtos(WorkoutParams workoutParams)
 {
     return(_workoutRepo.GetWorkoutsDtos(workoutParams));
 }