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); }
public async Task <PagedList <WorkoutResponse> > GetWorkoutResponsesAsync(WorkoutParams workoutParams) { return(await _workoutRepo.GetWorkoutResponsesAsync(workoutParams)); }
public Task <PagedList <WorkoutDto> > GetWorkoutDtos(WorkoutParams workoutParams) { return(_workoutRepo.GetWorkoutsDtos(workoutParams)); }