Skip to content

Commit

Permalink
kobo sync fix store sync merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gotson committed Aug 16, 2024
1 parent 4632440 commit f685fa0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class KoboController(
fun syncLibrary(
@AuthenticationPrincipal principal: KomgaPrincipal,
@PathVariable authToken: String,
): ResponseEntity<Collection<SyncResultDto>> {
): ResponseEntity<Collection<Any>> {
val syncTokenReceived = komgaSyncTokenGenerator.fromRequestHeaders(getCurrentRequest()) ?: KomgaSyncToken()

// find the ongoing sync point, else create one
Expand Down Expand Up @@ -278,7 +278,7 @@ class KoboController(
if (koboProxy.isEnabled()) {
try {
val koboStoreResponse = koboProxy.proxyCurrentRequest(includeSyncToken = true)
val syncResultsKobo = koboStoreResponse.body?.let { mapper.treeToValue<Collection<SyncResultDto>>(it) } ?: emptyList()
val syncResultsKobo = koboStoreResponse.body?.let { mapper.treeToValue<Collection<Any>>(it) } ?: emptyList()
val syncTokenKobo = koboStoreResponse.headers[X_KOBO_SYNCTOKEN]?.firstOrNull()?.let { komgaSyncTokenGenerator.fromBase64(it) }
val shouldContinueSyncKobo = koboStoreResponse.headers[X_KOBO_SYNC]?.firstOrNull()?.lowercase() == "continue"

Expand Down

0 comments on commit f685fa0

Please sign in to comment.