示例#1
0
def vote():
    data = request.json
    x = {'submission': 'successful'}
    response = app.response_class(response=json.dumps(data),
                                  status=200,
                                  mimetype='application/json')
    vote = Vote()
    vote.cast(data['session'], data['email'], data['framework'])
    return response
示例#2
0
 def vote(self, user, value):
     Vote.cast(user, self, value)
     self.fix_value()