From bf7f7a572bbf9e07a257ab74d801a566dfb7a3c6 Mon Sep 17 00:00:00 2001 From: aarbit Date: Mon, 1 Dec 2025 13:17:03 -0600 Subject: [PATCH] Changes sort default to descending --- src/main/kotlin/net/halfbinary/tmnt/service/MoviesService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/net/halfbinary/tmnt/service/MoviesService.kt b/src/main/kotlin/net/halfbinary/tmnt/service/MoviesService.kt index 382a417..7de382d 100644 --- a/src/main/kotlin/net/halfbinary/tmnt/service/MoviesService.kt +++ b/src/main/kotlin/net/halfbinary/tmnt/service/MoviesService.kt @@ -8,7 +8,7 @@ import org.springframework.stereotype.Service @Service class MoviesService(val moviesRepository: MoviesRepository) { fun getAllMovies(): List { - return moviesRepository.findAll().map { it.toModel()} + return moviesRepository.findAll().map { it.toModel()}.sortedByDescending { it.screenedDate } } fun createNewMovie(newMovie: Movie) {