public async Task <IActionResult> GetActividades([FromQuery] UserParams userParams) { var currentUserId = int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value); var userFromRepo = await _repository.GetUser(currentUserId, true); userParams.UserId = currentUserId; var actividades = await _repository.GetActividades(userParams); var actividadesToReturn = _mapper.Map <IEnumerable <ActividadForListDto> >(actividades); Response.AddPagination(actividades.CurrentPage, actividades.PageSize, actividades.TotalCount, actividades.TotalPages); return(Ok(actividadesToReturn)); }