def vote_down_answer(question_id, answer_id): if session['id']: user_id = session['id'] else: pass data_manager.vote_down_answer(answer_id, -1, user_id) return redirect("/list/question/" + question_id)
def vote_down_answer(answer_id): data_manager.vote_down_answer(answer_id) question_id = data_manager.get_question_id_by_answer_id( answer_id)['question_id'] user_id = data_manager.get_display_question(question_id)['user_id'] reputation = data_manager.get_reputation(user_id=user_id) data_manager.update_reputation(user_id, (reputation - 2)) return redirect('/question/' + str(question_id))
def vote_down_answer(answer_id): data_manager.vote_down_answer(answer_id) user_id = data_manager.get_answer_owner(answer_id) if user_id == None: return redirect(request.referrer) else: owner_user = data_manager.get_user_name_after_id(user_id) vote = -1 data_manager.edit_reputation(vote, 'answer', owner_user) return redirect(request.referrer)
def vote_down_answer(question_id, answer_id): if request.method == 'POST': data_manager.vote_down_answer(question_id, answer_id) return redirect(url_for('route_question_id', question_id=question_id))
def vote_down_answer(answer_id: int): question_id = data_manager.get_question_id_by_answer_id(answer_id) question_id = question_id[0].get('id') data_manager.vote_down_answer(answer_id) return redirect(url_for('show_specific_question', question_id=question_id))
def vote_down_answer(answer_id): id_ = data_manager.get_question_by_answer(answer_id) data_manager.vote_down_answer(answer_id) return redirect(url_for('route_question', question_id=id_))
def A_vote_down(answer_id): data_manager.vote_down_answer(answer_id) return redirect(request.referrer)
def vote_down_answer(answer_id): data_manager.vote_down_answer(answer_id) question_id = data_manager.get_question_id_from_answer(answer_id) return redirect(f'/question/{question_id}')