mirror of https://gitlab.com/bashrc2/epicyon
Additional share fields
parent
4ca472ebc9
commit
830fb1288f
|
@ -17408,7 +17408,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
share_json = \
|
share_json = \
|
||||||
vf_proposal_from_id(self.server.base_dir,
|
vf_proposal_from_id(self.server.base_dir,
|
||||||
nickname, self.server.domain,
|
nickname, self.server.domain,
|
||||||
shares_file_type, share_id)
|
shares_file_type, share_id,
|
||||||
|
actor)
|
||||||
if share_json:
|
if share_json:
|
||||||
msg_str = json.dumps(share_json)
|
msg_str = json.dumps(share_json)
|
||||||
msg_str = self._convert_domains(calling_domain,
|
msg_str = self._convert_domains(calling_domain,
|
||||||
|
|
|
@ -2158,7 +2158,8 @@ def get_share_category(base_dir: str, nickname: str, domain: str,
|
||||||
|
|
||||||
|
|
||||||
def vf_proposal_from_id(base_dir: str, nickname: str, domain: str,
|
def vf_proposal_from_id(base_dir: str, nickname: str, domain: str,
|
||||||
shares_file_type: str, share_id: str) -> {}:
|
shares_file_type: str, share_id: str,
|
||||||
|
actor: str) -> {}:
|
||||||
"""Returns a ValueFlows proposal from a shared item id
|
"""Returns a ValueFlows proposal from a shared item id
|
||||||
"""
|
"""
|
||||||
shares_filename = \
|
shares_filename = \
|
||||||
|
@ -2183,6 +2184,7 @@ def vf_proposal_from_id(base_dir: str, nickname: str, domain: str,
|
||||||
publishes_direction = "receiver"
|
publishes_direction = "receiver"
|
||||||
reciprocal_direction = "provider"
|
reciprocal_direction = "provider"
|
||||||
shares_json[share_id]['shareId'] = share_id
|
shares_json[share_id]['shareId'] = share_id
|
||||||
|
shares_json[share_id]['actor'] = actor
|
||||||
return vf_proposal_from_share(shares_json[share_id],
|
return vf_proposal_from_share(shares_json[share_id],
|
||||||
share_type,
|
share_type,
|
||||||
publishes_direction,
|
publishes_direction,
|
||||||
|
|
|
@ -589,6 +589,7 @@ def get_shares_collection(actor: str, page_number: int, items_per_page: int,
|
||||||
|
|
||||||
for share_id, shared_item in shares_json.items():
|
for share_id, shared_item in shares_json.items():
|
||||||
shared_item['shareId'] = share_id
|
shared_item['shareId'] = share_id
|
||||||
|
shared_item['actor'] = actor
|
||||||
offer_item = vf_proposal_from_share(shared_item,
|
offer_item = vf_proposal_from_share(shared_item,
|
||||||
share_type,
|
share_type,
|
||||||
publishes_direction,
|
publishes_direction,
|
||||||
|
|
Loading…
Reference in New Issue