Пример #1
0
        public async Task <ActionResult <IEnumerable <WorkoutResponse> > > GetWorkouts([FromQuery] WorkoutParams workoutParams)
        {
            workoutParams.UserId = User.GetUserId();
            var workouts = await _workoutService.GetWorkoutResponsesAsync(workoutParams);

            Response.AddPaginationHeader(workouts.TotalItems, workouts.ItemsPerPage, workouts.PageNumber, workouts.TotalPages);
            return(workouts);
        }