예제 #1
0
def save_comments():
    """ Save comments to potential deals table """
    potential_deal_id = int(request.form.get("id"))
    action = request.form.get("action")
    if action.lower() == "none":
        action = None
    comments = request.form.get("comments")
    db_handler = DBHandler()
    db_handler.update_by_id(potential_deal_id, action, comments)
    # return redirect(url_for("home"))
    return jsonify({"success": True}), 200