Skip to content

Commit 1765f27

Browse files
committed
♻️refactor: update controllers to use paged service methods
- Replaced calls to non-paged service methods with their paged counterparts in Event, Organizer, Participant, and Speaker controllers to support paginated results.
1 parent 20d15b8 commit 1765f27

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

EventFlow.Presentation/Controllers/EventController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public async Task<IActionResult> GetAllEventsAsync([FromQuery] QueryParameters q
125125
{
126126
try
127127
{
128-
var result = await eventService.GetAllEventsAsync(queryParameters);
128+
var result = await eventService.GetAllPagedEventsAsync(queryParameters);
129129

130130
if (result.Items.Count == 0)
131131
return NotFound();

EventFlow.Presentation/Controllers/OrganizerController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public async Task<IActionResult> GetAllOrganizersAsync([FromQuery] QueryParamete
154154
{
155155
try
156156
{
157-
var result = await organizerService.GetAllOrganizersAsync(queryParameters);
157+
var result = await organizerService.GetAllPagedOrganizersAsync(queryParameters);
158158

159159
if (result.Items.Count == 0)
160160
return NotFound("Nenhum organizador encontrado com os critérios fornecidos.");

EventFlow.Presentation/Controllers/ParticipantController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public async Task<IActionResult> GetAllParticipantsAsync(int eventId, [FromQuery
153153
{
154154
try
155155
{
156-
var result = await participantService.GetAllParticipantsByEventIdAsync(eventId, queryParameters);
156+
var result = await participantService.GetAllPagedParticipantsByEventIdAsync(eventId, queryParameters);
157157

158158
if (result.Items.Count == 0)
159159
return NotFound("Nenhum participante encontrado para este evento com os critérios fornecidos.");

EventFlow.Presentation/Controllers/SpeakerController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public async Task<IActionResult> GetAllSpeakersAsync([FromQuery] QueryParameters
148148
{
149149
try
150150
{
151-
var result = await speakerService.GetAllSpeakersAsync(queryParameters);
151+
var result = await speakerService.GetAllPagedSpeakersAsync(queryParameters);
152152

153153
if (result.Items.Count == 0)
154154
return NotFound("Nenhum palestrante encontrado com os critérios fornecidos.");

0 commit comments

Comments
 (0)