Skip to content

Commit

Permalink
Merge pull request #86 from EscolaLMS/feature/START-40
Browse files Browse the repository at this point in the history
Remove paginate from me consultations
  • Loading branch information
HerbertIV authored Jun 29, 2022
2 parents 8491604 + febfc62 commit ba9af9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Http/Resources/ConsultationTermsResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function toArray($request)
$this->consultation->getDuration()
),
'busy_terms' => ConsultationTermResource::collection($consultationServiceContract->getBusyTermsFormatDate($this->consultation->getKey())),
'author' => $this->consultation->author ? ConsultationAuthorResource::make( $this->consultation->author) : null,
'author' => $this->consultation->author ? ConsultationAuthorResource::make($this->consultation->author) : null,
];
return self::apply($fields, $this);
}
Expand Down
5 changes: 1 addition & 4 deletions src/Services/ConsultationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,7 @@ public function forCurrentUserResponse(ListConsultationsRequest $listConsultatio
{
$search = $listConsultationsRequest->except(['limit', 'skip', 'order', 'order_by']);
$consultations = $this->getConsultationsListForCurrentUser($search);
$consultationsCollection = ConsultationSimpleResource::collection($consultations->paginate(
$listConsultationsRequest->get('per_page') ??
config('escolalms_consultations.perPage', ConstantEnum::PER_PAGE)
));
$consultationsCollection = ConsultationSimpleResource::collection($consultations->get());
ConsultationSimpleResource::extend(function (ConsultationSimpleResource $consultation) {
return [
'consultation_term_id' => $consultation->consultation_user_id,
Expand Down

0 comments on commit ba9af9a

Please sign in to comment.