refactor create dht value

This commit is contained in:
Christien Rioux
2023-07-08 22:50:44 -04:00
parent 9f9feeb325
commit 19f384ab33
13 changed files with 53 additions and 40 deletions

View File

@@ -277,10 +277,10 @@ impl JsonRequestProcessor {
),
}
}
RoutingContextRequestOp::CreateDhtRecord { kind, schema } => {
RoutingContextRequestOp::CreateDhtRecord { schema, kind } => {
RoutingContextResponseOp::CreateDhtRecord {
result: to_json_api_result(
routing_context.create_dht_record(kind, schema).await,
routing_context.create_dht_record(schema, kind).await,
),
}
}

View File

@@ -38,9 +38,9 @@ pub enum RoutingContextRequestOp {
message: Vec<u8>,
},
CreateDhtRecord {
#[schemars(with = "String")]
kind: CryptoKind,
schema: DHTSchema,
#[schemars(with = "Option<String>")]
kind: Option<CryptoKind>,
},
OpenDhtRecord {
#[schemars(with = "String")]