mirror of
https://github.com/gotson/komga.git
synced 2025-12-21 07:56:57 +01:00
parent
2c08741b02
commit
1603a96de6
1 changed files with 6 additions and 3 deletions
|
|
@ -119,6 +119,7 @@ class SeriesController(
|
|||
@GetMapping("/latest")
|
||||
fun getLatestSeries(
|
||||
@AuthenticationPrincipal principal: KomgaPrincipal,
|
||||
@RequestParam(name = "library_id", required = false) libraryIds: List<String>?,
|
||||
@RequestParam(name = "unpaged", required = false) unpaged: Boolean = false,
|
||||
@Parameter(hidden = true) page: Pageable
|
||||
): Page<SeriesDto> {
|
||||
|
|
@ -133,7 +134,7 @@ class SeriesController(
|
|||
)
|
||||
|
||||
return seriesDtoRepository.findAll(
|
||||
SeriesSearchWithReadProgress(principal.user.getAuthorizedLibraryIds(null)),
|
||||
SeriesSearchWithReadProgress(principal.user.getAuthorizedLibraryIds(libraryIds)),
|
||||
principal.user.id,
|
||||
pageRequest
|
||||
).map { it.restrictUrl(!principal.user.roleAdmin) }
|
||||
|
|
@ -144,6 +145,7 @@ class SeriesController(
|
|||
@GetMapping("/new")
|
||||
fun getNewSeries(
|
||||
@AuthenticationPrincipal principal: KomgaPrincipal,
|
||||
@RequestParam(name = "library_id", required = false) libraryIds: List<String>?,
|
||||
@RequestParam(name = "unpaged", required = false) unpaged: Boolean = false,
|
||||
@Parameter(hidden = true) page: Pageable
|
||||
): Page<SeriesDto> {
|
||||
|
|
@ -158,7 +160,7 @@ class SeriesController(
|
|||
)
|
||||
|
||||
return seriesDtoRepository.findAll(
|
||||
SeriesSearchWithReadProgress(principal.user.getAuthorizedLibraryIds(null)),
|
||||
SeriesSearchWithReadProgress(principal.user.getAuthorizedLibraryIds(libraryIds)),
|
||||
principal.user.id,
|
||||
pageRequest
|
||||
).map { it.restrictUrl(!principal.user.roleAdmin) }
|
||||
|
|
@ -169,6 +171,7 @@ class SeriesController(
|
|||
@GetMapping("/updated")
|
||||
fun getUpdatedSeries(
|
||||
@AuthenticationPrincipal principal: KomgaPrincipal,
|
||||
@RequestParam(name = "library_id", required = false) libraryIds: List<String>?,
|
||||
@RequestParam(name = "unpaged", required = false) unpaged: Boolean = false,
|
||||
@Parameter(hidden = true) page: Pageable
|
||||
): Page<SeriesDto> {
|
||||
|
|
@ -183,7 +186,7 @@ class SeriesController(
|
|||
)
|
||||
|
||||
return seriesDtoRepository.findRecentlyUpdated(
|
||||
SeriesSearchWithReadProgress(principal.user.getAuthorizedLibraryIds(null)),
|
||||
SeriesSearchWithReadProgress(principal.user.getAuthorizedLibraryIds(libraryIds)),
|
||||
principal.user.id,
|
||||
pageRequest
|
||||
).map { it.restrictUrl(!principal.user.roleAdmin) }
|
||||
|
|
|
|||
Loading…
Reference in a new issue