mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
clean up links wrapper
This commit is contained in:
parent
8fa231c040
commit
15b91fea99
@ -34,10 +34,8 @@ class StatusApi(Resource):
|
|||||||
if args['tx_id']:
|
if args['tx_id']:
|
||||||
status = bigchain.get_status(args['tx_id'])
|
status = bigchain.get_status(args['tx_id'])
|
||||||
links = {
|
links = {
|
||||||
"_links": {
|
|
||||||
"tx": "/transactions/{}".format(args['tx_id'])
|
"tx": "/transactions/{}".format(args['tx_id'])
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
elif args['block_id']:
|
elif args['block_id']:
|
||||||
block = bigchain.get_block(block_id=args['block_id'])
|
block = bigchain.get_block(block_id=args['block_id'])
|
||||||
@ -57,6 +55,8 @@ class StatusApi(Resource):
|
|||||||
}
|
}
|
||||||
|
|
||||||
if links:
|
if links:
|
||||||
response.update(links)
|
response.update({
|
||||||
|
"_links": links
|
||||||
|
})
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
Loading…
x
Reference in New Issue
Block a user