Exemplo n.º 1
0
def change(message, place_id):
    if message:
        db = Db(db_dir)
        place = db.get_place(place_id)
        today = db.get_today_crusade()
        if today:
            db.update_crusade(place[0])
        else:
            db.add_crusade(place[0])
        return str(place[1])
Exemplo n.º 2
0
def delete(message, place_id):
    if message:
        db = Db(db_dir)
        place = db.get_place(place_id)
        db.set_delete(place_id, int(not bool(place[3])))
        return str(place[1])