refactor create dht value
This commit is contained in:
@@ -46,7 +46,7 @@ class RoutingContext(ABC):
|
||||
|
||||
@abstractmethod
|
||||
async def create_dht_record(
|
||||
self, kind: types.CryptoKind, schema: types.DHTSchema
|
||||
self, schema: types.DHTSchema, kind: Optional[types.CryptoKind] = None
|
||||
) -> types.DHTRecordDescriptor:
|
||||
pass
|
||||
|
||||
|
@@ -514,7 +514,7 @@ class _JsonRoutingContext(RoutingContext):
|
||||
)
|
||||
|
||||
async def create_dht_record(
|
||||
self, kind: CryptoKind, schema: DHTSchema
|
||||
self, schema: DHTSchema, kind: Optional[CryptoKind] = None
|
||||
) -> DHTRecordDescriptor:
|
||||
return DHTRecordDescriptor.from_json(
|
||||
raise_api_result(
|
||||
|
@@ -303,13 +303,15 @@
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kind",
|
||||
"rc_op",
|
||||
"schema"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string"
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"rc_op": {
|
||||
"type": "string",
|
||||
|
Reference in New Issue
Block a user