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
|
Caffeine
|
||||||
.newBuilder()
|
.newBuilder()
|
||||||
.expireAfterAccess(1, TimeUnit.DAYS)
|
.expireAfterAccess(1, TimeUnit.DAYS)
|
||||||
.build<String, JsonFeedDto>()
|
.build<String, JsonFeedDto?>()
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("hasRole('ADMIN')")
|
@PreAuthorize("hasRole('ADMIN')")
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ class ReleaseController(
|
||||||
}
|
}
|
||||||
?: throw ResponseStatusException(HttpStatus.NOT_FOUND)
|
?: throw ResponseStatusException(HttpStatus.NOT_FOUND)
|
||||||
|
|
||||||
fun fetchGitHubReleases(): List<GithubReleaseDto>? {
|
fun fetchGitHubReleases(): List<GithubReleaseDto> {
|
||||||
val response =
|
val response =
|
||||||
webClient
|
webClient
|
||||||
.get()
|
.get()
|
||||||
|
|
@ -67,6 +67,6 @@ class ReleaseController(
|
||||||
}.retrieve()
|
}.retrieve()
|
||||||
.toEntity(object : ParameterizedTypeReference<List<GithubReleaseDto>>() {})
|
.toEntity(object : ParameterizedTypeReference<List<GithubReleaseDto>>() {})
|
||||||
.block()
|
.block()
|
||||||
return response?.body
|
return response?.body ?: emptyList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue