File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
PrivMXEndpointSwiftNative
PrivMXEndpointSwift/Kvdbs Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,21 @@ public class KvdbApi: @unchecked Sendable{
6464 managers: privmx . UserWithPubKeyVector ,
6565 publicMeta: privmx . endpoint . core . Buffer ,
6666 privateMeta: privmx . endpoint . core . Buffer ,
67- policies: privmx . OptionalContainerPolicy = nil
67+ policies: privmx . endpoint . core . ContainerPolicy ? = nil
6868 ) throws -> std . string {
69+
70+ var optPolicies = privmx. OptionalContainerPolicy ( )
71+ if let policies{
72+ optPolicies = privmx. makeOptional ( policies)
73+ }
74+
6975 let res = api. createKvdb (
7076 contextId,
7177 users,
7278 managers,
7379 publicMeta,
7480 privateMeta,
75- policies )
81+ optPolicies )
7682 guard res. error. value == nil else {
7783 throw PrivMXEndpointError . failedCreatingKvdb ( res. error. value!)
7884 }
Original file line number Diff line number Diff line change @@ -43,15 +43,15 @@ ResultWithError<NativeKvdbApiWrapper> NativeKvdbApiWrapper::create(NativeConnect
4343 return res;
4444}
4545
46- ResultWithError<std::string> NativeKvdbApiWrapper::createKvdb (const std::string& kvdbId ,
46+ ResultWithError<std::string> NativeKvdbApiWrapper::createKvdb (const std::string& contextId ,
4747 const UserWithPubKeyVector& users,
4848 const UserWithPubKeyVector& managers,
4949 const endpoint::core::Buffer& publicMeta,
5050 const endpoint::core::Buffer& privateMeta,
5151 const OptionalContainerPolicy& policies){
5252 auto res = ResultWithError<std::string>();
5353 try {
54- res.result = getapi ()->createKvdb (kvdbId ,
54+ res.result = getapi ()->createKvdb (contextId ,
5555 users,
5656 managers,
5757 publicMeta,
You can’t perform that action at this time.
0 commit comments