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 {
|
) : PostsRepo, ReadPostsRepo by readPostsRepo, WritePostsRepo by writePostsRepo {
|
||||||
constructor(
|
constructor(
|
||||||
baseUrl: String,
|
baseUrl: String,
|
||||||
rootRoute: String = postsRootRoute,
|
rootRoute: String? = postsRootRoute,
|
||||||
client: HttpClient = HttpClient {
|
client: HttpClient = HttpClient {
|
||||||
install(WebSockets)
|
install(WebSockets)
|
||||||
}
|
}
|
||||||
) : this(
|
) : this(
|
||||||
ReadPostsRepoKtorClient(
|
ReadPostsRepoKtorClient(
|
||||||
"${baseUrl}/$rootRoute",
|
rootRoute ?.let { "${baseUrl}/$rootRoute" } ?: baseUrl,
|
||||||
client
|
client
|
||||||
),
|
),
|
||||||
WritePostsRepoKtorClient(
|
WritePostsRepoKtorClient(
|
||||||
"${baseUrl}/$rootRoute",
|
rootRoute ?.let { "${baseUrl}/$rootRoute" } ?: baseUrl,
|
||||||
client
|
client
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -11,16 +11,17 @@ class PublishingKeysRepoKtorClient private constructor (
|
|||||||
) : PublishingKeysRepo, ReadPublishingKeysRepo by readPublishingKeysClient, WritePublishingKeysRepo by writePublishingKeysClient {
|
) : PublishingKeysRepo, ReadPublishingKeysRepo by readPublishingKeysClient, WritePublishingKeysRepo by writePublishingKeysClient {
|
||||||
constructor(
|
constructor(
|
||||||
baseUrl: String,
|
baseUrl: String,
|
||||||
|
subpath: String? = publishingKeysRootRoute,
|
||||||
client: HttpClient = HttpClient {
|
client: HttpClient = HttpClient {
|
||||||
install(WebSockets)
|
install(WebSockets)
|
||||||
}
|
}
|
||||||
) : this (
|
) : this (
|
||||||
ReadPublishingKeysRepoKtorClient (
|
ReadPublishingKeysRepoKtorClient (
|
||||||
"$baseUrl/$publishingKeysRootRoute",
|
subpath ?.let { "$baseUrl/$subpath" } ?: baseUrl,
|
||||||
client
|
client
|
||||||
),
|
),
|
||||||
WritePublishingKeysRepoKtorClient(
|
WritePublishingKeysRepoKtorClient(
|
||||||
"$baseUrl/$publishingKeysRootRoute",
|
subpath ?.let { "$baseUrl/$subpath" } ?: baseUrl,
|
||||||
client
|
client
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user