Skip to content

Commit 2ec843d

Browse files
committed
changes to updateKvdb
1 parent e8fb5b5 commit 2ec843d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Sources/PrivMXEndpointSwift/Kvdbs/KvdbApi.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,14 @@ public class KvdbApi: @unchecked Sendable{
114114
version: Int64,
115115
force:Bool,
116116
forceGenerateNewKey:Bool,
117-
policies:privmx.OptionalContainerPolicy = nil
117+
policies:privmx.endpoint.core.ContainerPolicy? = nil
118118
) throws -> Void {
119+
120+
var op = privmx.OptionalContainerPolicy()
121+
if let policies{
122+
op = privmx.makeOptional(policies)
123+
}
124+
119125
let res = api.updateKvdb(
120126
kvdbId,
121127
users,
@@ -125,7 +131,7 @@ public class KvdbApi: @unchecked Sendable{
125131
version,
126132
force,
127133
forceGenerateNewKey,
128-
policies)
134+
op)
129135
guard res.error.value == nil else {
130136
throw PrivMXEndpointError.failedUpdatingKvdb(res.error.value!)
131137
}

0 commit comments

Comments
 (0)