You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@steve.apache.org by hu...@apache.org on 2016/02/07 10:52:42 UTC
svn commit: r1728938 - /steve/trunk/pysteve/www/cgi-bin/rest_voter.py
Author: humbedooh
Date: Sun Feb 7 09:52:42 2016
New Revision: 1728938
URL: http://svn.apache.org/viewvc?rev=1728938&view=rev
Log:
allow the voter to receive their vote UID if they wish to correlate with a monitor
Modified:
steve/trunk/pysteve/www/cgi-bin/rest_voter.py
Modified: steve/trunk/pysteve/www/cgi-bin/rest_voter.py
URL: http://svn.apache.org/viewvc/steve/trunk/pysteve/www/cgi-bin/rest_voter.py?rev=1728938&r1=1728937&r2=1728938&view=diff
==============================================================================
--- steve/trunk/pysteve/www/cgi-bin/rest_voter.py (original)
+++ steve/trunk/pysteve/www/cgi-bin/rest_voter.py Sun Feb 7 09:52:42 2016
@@ -134,7 +134,8 @@ if pathinfo:
response.respond(500, {'message': invalid})
else:
votehash = election.vote(electionID, issueID, voterID, vote)
- voter.email(email, "Vote registered: %s (%s)" % (issueID, issuedata['title']), "This is a receipt that your vote was registered for issue #%s:\n\nElection: %s (%s)\nIssue: %s (%s)\nVote cryptohash: %s" % (issueID, basedata['title'], electionID, issuedata['title'], issueID, votehash))
+ voteuid = hashlib.sha224(voterID).hexdigest()
+ voter.email(email, "Vote registered: %s (%s)" % (issueID, issuedata['title']), "This is a receipt that your vote was registered for issue #%s:\n\nElection: %s (%s)\nIssue: %s (%s)\nVote cryptohash: %s\nVote UID: %s" % (issueID, basedata['title'], electionID, issuedata['title'], issueID, votehash, voteuid))
response.respond(200, {'message': 'Vote saved!'})
else:
response.respond(404, {'message': 'Could not save vote: No such election or issue'})