downloadable, selectWallet
This commit is contained in:
1 parent
66da3541e7
commit
ac6d102a3f
6 files changed
+15
-4
No files matched your search
@@ -90,7 +90,8 @@ async def s_api_v1_blockchain_send_new_content_message(request):
|
||||
title=content_title,
|
||||
cover_url=f"{PROJECT_HOST}/api/v1.5/storage/{image_content_cid.serialize_v2()}" if image_content_cid else None,
|
||||
authors=request.json['authors'],
|
||||
hashtags=request.json['hashtags']
|
||||
hashtags=request.json['hashtags'],
|
||||
downloadable=request.json['downloadable'] if 'downloadable' in request.json else False,
|
||||
)
|
||||
|
||||
royalties_dict = begin_dict(8)
|
||||
|
||||
@@ -119,3 +119,9 @@ async def s_api_v1_auth_twa(request):
|
||||
'connected_wallet': ton_connection.json_format() if ton_connection else None,
|
||||
'auth_v1_token': new_user_key['auth_v1_token']
|
||||
})
|
||||
|
||||
async def s_api_v1_auth_select_wallet(request):
|
||||
if not request.ctx.user:
|
||||
return response.json({"error": "Unauthorized"}, status=401)
|
||||
|
||||
return response.empty(status=200)
|
||||
@@ -154,11 +154,12 @@ async def s_api_v1_content_view(request, content_address: str):
|
||||
content_metadata_json = json.loads(f.read())
|
||||
|
||||
display_options['metadata'] = content_metadata_json
|
||||
opts['downloadable'] = content_metadata_json.get('downloadable', False)
|
||||
|
||||
return response.json({
|
||||
**opts,
|
||||
'encrypted': content['encrypted_content'].json_format(),
|
||||
'display_options': display_options
|
||||
'display_options': display_options,
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user