feat: Add vote proofs
All checks were successful
Build Docker / Build Image (push) Successful in 23s

This commit is contained in:
Nathan Woodburn 2024-02-25 21:46:57 +11:00
parent e960d6d0ef
commit b3d9e66916
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 7 additions and 2 deletions

View File

@ -174,7 +174,12 @@ def send_discord_message(data):
if DISCORD_WEBHOOK is not None: if DISCORD_WEBHOOK is not None:
requests.post(DISCORD_WEBHOOK, data=json.dumps(message), headers={'Content-Type': 'application/json'}) requests.post(DISCORD_WEBHOOK, data=json.dumps(message), headers={'Content-Type': 'application/json'})
@app.route('/votes')
def download():
resp = make_response(send_from_directory('data', 'votes.json'))
# Set as json
resp.headers['Content-Type'] = 'application/json'
return resp
# 404 catch all # 404 catch all
@app.errorhandler(404) @app.errorhandler(404)

View File

@ -55,7 +55,7 @@
</div>{{votes|safe}} </div>{{votes|safe}}
</div> </div>
<div class="col-12 col-lg-10 mx-auto"> <div class="col-12 col-lg-10 mx-auto">
<div class="text-center position-relative"><img class="img-fluid" src="assets/img/illustrations/meeting.svg" style="width: 800px;"></div> <div class="text-center position-relative" style="padding-top: 25px;"><a class="btn btn-primary" role="button" target="_blank" href="/votes">View vote proofs</a><img class="img-fluid" src="assets/img/illustrations/meeting.svg" style="width: 800px;"></div>
</div> </div>
</div> </div>
</div> </div>