diff --git a/backend/Controllers/MovieController.cs b/backend/Controllers/MovieController.cs index 32b77db..032d649 100644 --- a/backend/Controllers/MovieController.cs +++ b/backend/Controllers/MovieController.cs @@ -29,6 +29,10 @@ public class MovieController: ControllerBase IEnumerable resultSkip = movies.Skip(pageSize * (pageNumber - 1)); IEnumerable resultTake = resultSkip.Take(pageSize); + if (resultTake.ToList().Count == 0) { + return StatusCode(204, "No Content"); + } + return Ok(resultTake); } catch (Exception ex)