Don't send full election data unless requested

This commit is contained in:
RunasSudo 2017-11-29 20:23:52 +11:00
parent 30cb0d674e
commit d9f1291bea
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -197,7 +197,7 @@ def using_election(func):
@app.route('/election/<election_id>/')
@using_election
def election_api_json(election):
return flask.Response(EosObject.to_json(EosObject.serialise_and_wrap(election, should_protect=True)), mimetype='application/json')
return flask.Response(EosObject.to_json(EosObject.serialise_and_wrap(election, should_protect=True, for_hash=('full' not in flask.request.args))), mimetype='application/json')
@app.route('/election/<election_id>/view')
@using_election