refactor: fix types for new Kotlin compiler

This commit is contained in:
Gauthier Roebroeck 2025-07-15 12:22:45 +08:00
parent aa80ef83a7
commit 34c7d8b39b
2 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ class AnnouncementController(
Caffeine
.newBuilder()
.expireAfterAccess(1, TimeUnit.DAYS)
.build<String, JsonFeedDto>()
.build<String, JsonFeedDto?>()
@GetMapping
@PreAuthorize("hasRole('ADMIN')")

View file

@ -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()
}
}