mirror of
https://github.com/gotson/komga.git
synced 2025-12-06 08:32:25 +01:00
refactor: fix types for new Kotlin compiler
This commit is contained in:
parent
aa80ef83a7
commit
34c7d8b39b
2 changed files with 3 additions and 3 deletions
|
|
@ -36,7 +36,7 @@ class AnnouncementController(
|
|||
Caffeine
|
||||
.newBuilder()
|
||||
.expireAfterAccess(1, TimeUnit.DAYS)
|
||||
.build<String, JsonFeedDto>()
|
||||
.build<String, JsonFeedDto?>()
|
||||
|
||||
@GetMapping
|
||||
@PreAuthorize("hasRole('ADMIN')")
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class ReleaseController(
|
|||
}
|
||||
?: throw ResponseStatusException(HttpStatus.NOT_FOUND)
|
||||
|
||||
fun fetchGitHubReleases(): List<GithubReleaseDto>? {
|
||||
fun fetchGitHubReleases(): List<GithubReleaseDto> {
|
||||
val response =
|
||||
webClient
|
||||
.get()
|
||||
|
|
@ -67,6 +67,6 @@ class ReleaseController(
|
|||
}.retrieve()
|
||||
.toEntity(object : ParameterizedTypeReference<List<GithubReleaseDto>>() {})
|
||||
.block()
|
||||
return response?.body
|
||||
return response?.body ?: emptyList()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue