fixed constructor of PublishingKeysRepoKtorClient

This commit is contained in:
000Sanya 2020-08-16 14:30:13 +10:00
parent 8a4934a65a
commit b4798bc062

View File

@ -3,8 +3,26 @@ package com.insanusmokrassar.postssystem.publishing.ktor.client
import com.insanusmokrassar.postssystem.core.publishing.repos.PublishingKeysRepo import com.insanusmokrassar.postssystem.core.publishing.repos.PublishingKeysRepo
import com.insanusmokrassar.postssystem.core.publishing.repos.ReadPublishingKeysRepo import com.insanusmokrassar.postssystem.core.publishing.repos.ReadPublishingKeysRepo
import com.insanusmokrassar.postssystem.core.publishing.repos.WritePublishingKeysRepo import com.insanusmokrassar.postssystem.core.publishing.repos.WritePublishingKeysRepo
import io.ktor.client.HttpClient
import io.ktor.client.features.websocket.WebSockets
class PublishingKeysRepoKtorClient ( class PublishingKeysRepoKtorClient private constructor (
readPublishingKeysClient: ReadPublishingKeysRepoKtorClient, readPublishingKeysClient: ReadPublishingKeysRepoKtorClient,
writePublishingKeysClient: WritePublishingKeysRepoKtorClient writePublishingKeysClient: WritePublishingKeysRepoKtorClient
) : PublishingKeysRepo, ReadPublishingKeysRepo by readPublishingKeysClient, WritePublishingKeysRepo by writePublishingKeysClient ) : PublishingKeysRepo, ReadPublishingKeysRepo by readPublishingKeysClient, WritePublishingKeysRepo by writePublishingKeysClient {
constructor(
baseUrl: String,
client: HttpClient = HttpClient {
install(WebSockets)
}
) : this (
ReadPublishingKeysRepoKtorClient (
baseUrl,
client
),
WritePublishingKeysRepoKtorClient(
baseUrl,
client
)
)
}