예제 #1
0
def delete_vote(table, vote, id):
    v_id = input("Please input id of the one you want to delete:")
    if table == 'post':
        if vote == 'up':
            pu.delete(v_id)
        else:
            pd.delete(v_id)
        show_votes('post', id)
    else:
        if vote == 'up':
            cu.delete(v_id)
        else:
            cd.delete(v_id)
        show_comment(id)
예제 #2
0
파일: app.py 프로젝트: yulu9206/seenit_lu
def delete_vote(table, vote, id):
    logging.info("delete_vote request user response: Please input id of the one you want to delete\n")
    v_id = input("Please input id of the one you want to delete:")
    logging.info("Response: ")
    logging.info(v_id)
    logging.info("\n")
    if table == 'post':
        if vote == 'up':
            pu.delete(v_id)
        else:
            pd.delete(v_id)
        show_votes('post', id)
    else:
        if vote == 'up':
            cu.delete(v_id)
        else:
            cd.delete(v_id)
        show_comment(id)