mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 11:24:35 -05:00
Fix/remove koreader-sync credentials from server config (#1758)
* Remove koreader-sync credentials from config These are supposed to be set via the login/logout mutations and are not meant to be set manually by the user. Thus, they are not really settings and do not belong to the config * Reduce log levels of KoreaderSyncService
This commit is contained in:
@@ -8,8 +8,8 @@ import suwayomi.tachidesk.graphql.asDataFetcherResult
|
||||
import suwayomi.tachidesk.graphql.directives.RequireAuth
|
||||
import suwayomi.tachidesk.graphql.types.ChapterType
|
||||
import suwayomi.tachidesk.graphql.types.KoSyncConnectPayload
|
||||
import suwayomi.tachidesk.graphql.types.KoSyncStatusPayload
|
||||
import suwayomi.tachidesk.graphql.types.LogoutKoSyncAccountPayload
|
||||
import suwayomi.tachidesk.graphql.types.SettingsType
|
||||
import suwayomi.tachidesk.graphql.types.SyncConflictInfoType
|
||||
import suwayomi.tachidesk.manga.impl.sync.KoreaderSyncService
|
||||
import suwayomi.tachidesk.manga.model.table.ChapterTable
|
||||
@@ -26,14 +26,12 @@ class KoreaderSyncMutation {
|
||||
@RequireAuth
|
||||
fun connectKoSyncAccount(input: ConnectKoSyncAccountInput): CompletableFuture<KoSyncConnectPayload> =
|
||||
future {
|
||||
val result = KoreaderSyncService.connect(input.username, input.password)
|
||||
val (message, status) = KoreaderSyncService.connect(input.username, input.password)
|
||||
|
||||
KoSyncConnectPayload(
|
||||
clientMutationId = input.clientMutationId,
|
||||
success = result.success,
|
||||
message = result.message,
|
||||
username = result.username,
|
||||
settings = SettingsType(),
|
||||
message = message,
|
||||
status = status,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -47,8 +45,7 @@ class KoreaderSyncMutation {
|
||||
KoreaderSyncService.logout()
|
||||
LogoutKoSyncAccountPayload(
|
||||
clientMutationId = input.clientMutationId,
|
||||
success = true,
|
||||
settings = SettingsType(),
|
||||
status = KoSyncStatusPayload(isLoggedIn = false, username = null),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -7,14 +7,11 @@ data class KoSyncStatusPayload(
|
||||
|
||||
data class KoSyncConnectPayload(
|
||||
val clientMutationId: String?,
|
||||
val success: Boolean,
|
||||
val status: KoSyncStatusPayload,
|
||||
val message: String?,
|
||||
val username: String?,
|
||||
val settings: SettingsType,
|
||||
)
|
||||
|
||||
data class LogoutKoSyncAccountPayload(
|
||||
val clientMutationId: String?,
|
||||
val success: Boolean,
|
||||
val settings: SettingsType,
|
||||
val status: KoSyncStatusPayload,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user