Ejemplo n.º 1
0
def accept_answer(question_id, answer_id):
    queries.accept_answer(answer_id)
    common.reputation_counter('15', 'answer', answer_id)
    return redirect("/question/" + question_id + "/")
Ejemplo n.º 2
0
def route_upvote_answer(questionid=None, answerid=None):
    id_num = int(answerid)
    id_question = questionid
    common.reputation_counter('10', 'answer', id_num)
    queries.answer_vote_up(id_num)
    return redirect('/question/' + id_question + "/")
Ejemplo n.º 3
0
def route_downvote_answer(questionid=None, answerid=None):
    id_num = answerid
    id_question = questionid
    common.reputation_counter('-2', 'answer', id_num)
    queries.answer_vote_down(id_num)
    return redirect('/question/' + id_question + "/")
Ejemplo n.º 4
0
def route_downvote_question(questionid=None):
    id_num = questionid
    common.reputation_counter("-2", 'question', id_num)
    queries.question_vote_down(id_num)
    return redirect('/')