From b4798bc06271cf95f2e5421fa54fd399d6eece95 Mon Sep 17 00:00:00 2001
From: 000Sanya <000sanya.000sanya@gmail.com>
Date: Sun, 16 Aug 2020 14:30:13 +1000
Subject: [PATCH] fixed constructor of PublishingKeysRepoKtorClient

---
 .../client/PublishingKeysRepoKtorClient.kt    | 22 +++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/publishing/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/publishing/ktor/client/PublishingKeysRepoKtorClient.kt b/publishing/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/publishing/ktor/client/PublishingKeysRepoKtorClient.kt
index 7855dbe3..d2b32baa 100644
--- a/publishing/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/publishing/ktor/client/PublishingKeysRepoKtorClient.kt
+++ b/publishing/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/publishing/ktor/client/PublishingKeysRepoKtorClient.kt
@@ -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.ReadPublishingKeysRepo
 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,
     writePublishingKeysClient: WritePublishingKeysRepoKtorClient
-) : PublishingKeysRepo, ReadPublishingKeysRepo by readPublishingKeysClient, WritePublishingKeysRepo by writePublishingKeysClient
\ No newline at end of file
+) : PublishingKeysRepo, ReadPublishingKeysRepo by readPublishingKeysClient, WritePublishingKeysRepo by writePublishingKeysClient {
+    constructor(
+        baseUrl: String,
+        client: HttpClient = HttpClient {
+            install(WebSockets)
+        }
+    ) : this (
+        ReadPublishingKeysRepoKtorClient (
+            baseUrl,
+            client
+        ),
+        WritePublishingKeysRepoKtorClient(
+            baseUrl,
+            client
+        )
+    )
+}
\ No newline at end of file