fix: ページネーション対応忘れを修正

This commit is contained in:
usbharu 2024-01-31 21:56:28 +09:00
parent 40c2c93f89
commit 61e61ec4bd
1 changed files with 9 additions and 1 deletions

View File

@ -35,7 +35,15 @@ class MastodonTimelineApiController(
limit = limit?.coerceIn(0, 80) ?: 40
)
)
ResponseEntity(homeTimeline.asFlow(), HttpStatus.OK)
val httpHeader = homeTimeline.toHttpHeader(
{ "${applicationConfig.url}/api/v1/home?max_id=$it" },
{ "${applicationConfig.url}/api/v1/home?min_id=$it" }
) ?: return@runBlocking ResponseEntity(
homeTimeline.asFlow(),
HttpStatus.OK
)
ResponseEntity.ok().header("Link", httpHeader).body(homeTimeline.asFlow())
}
override fun apiV1TimelinesPublicGet(