ReadKeyValuesRepo#removeWithValue

This commit is contained in:
2023-04-25 19:14:38 +06:00
parent 4e97ce86aa
commit 5f231c2212
12 changed files with 147 additions and 3 deletions

View File

@@ -47,6 +47,17 @@ class KtorWriteKeyValuesRepoClient<Key : Any, Value : Any>(
}.throwOnUnsuccess { "Unable to remove $toRemove" }
}
@OptIn(InternalAPI::class)
override suspend fun removeWithValue(v: Value) {
httpClient.post(
buildStandardUrl(baseUrl, removeWithValueRoute)
) {
body = v
bodyType = valueTypeInfo
contentType(contentType)
}.throwOnUnsuccess { "Unable to remove $v" }
}
@OptIn(InternalAPI::class)
override suspend fun clear(k: Key) {
httpClient.post(