Fixed bug for not defined /block/<hash> endpoint

This commit is contained in:
Daxeel Soni 2018-01-26 10:39:46 +05:30 committed by GitHub
parent a5f5322a84
commit e7cb8df41d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

2
web.py
View File

@ -39,6 +39,8 @@ def block(hash):
for eachBlock in data:
if eachBlock['hash'] == hash:
return render_template('blockdata.html', data=eachBlock)
else:
return "No block found!"
# Run flask app
if __name__ == '__main__':