nullabilities of root routes in clients
This commit is contained in:
parent
f5a5330e93
commit
4d0aae2b91
@ -11,17 +11,17 @@ class PostsRepoKtorClient private constructor(
|
||||
) : PostsRepo, ReadPostsRepo by readPostsRepo, WritePostsRepo by writePostsRepo {
|
||||
constructor(
|
||||
baseUrl: String,
|
||||
rootRoute: String = postsRootRoute,
|
||||
rootRoute: String? = postsRootRoute,
|
||||
client: HttpClient = HttpClient {
|
||||
install(WebSockets)
|
||||
}
|
||||
) : this(
|
||||
ReadPostsRepoKtorClient(
|
||||
"${baseUrl}/$rootRoute",
|
||||
rootRoute ?.let { "${baseUrl}/$rootRoute" } ?: baseUrl,
|
||||
client
|
||||
),
|
||||
WritePostsRepoKtorClient(
|
||||
"${baseUrl}/$rootRoute",
|
||||
rootRoute ?.let { "${baseUrl}/$rootRoute" } ?: baseUrl,
|
||||
client
|
||||
)
|
||||
)
|
||||
|
@ -11,16 +11,17 @@ class PublishingKeysRepoKtorClient private constructor (
|
||||
) : PublishingKeysRepo, ReadPublishingKeysRepo by readPublishingKeysClient, WritePublishingKeysRepo by writePublishingKeysClient {
|
||||
constructor(
|
||||
baseUrl: String,
|
||||
subpath: String? = publishingKeysRootRoute,
|
||||
client: HttpClient = HttpClient {
|
||||
install(WebSockets)
|
||||
}
|
||||
) : this (
|
||||
ReadPublishingKeysRepoKtorClient (
|
||||
"$baseUrl/$publishingKeysRootRoute",
|
||||
subpath ?.let { "$baseUrl/$subpath" } ?: baseUrl,
|
||||
client
|
||||
),
|
||||
WritePublishingKeysRepoKtorClient(
|
||||
"$baseUrl/$publishingKeysRootRoute",
|
||||
subpath ?.let { "$baseUrl/$subpath" } ?: baseUrl,
|
||||
client
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user