예제 #1
0
def remove_phone_record(phone_num):
    if phone_num == 0:
        return jsonify({"res":1,"err":"need phone num"})

    if cardb.get_record(phone_num,"phone") is None:
        return jsonify({"res":1,"err":"phone num already removed"})

    cardb.remove_record(phone_num,"phone")
    return jsonify({"res":0, "data":"success delete"})
예제 #2
0
def remove_car_record(car_num):
    if car_num == 0:
        return jsonify({"res":1,"err":"need car num"})

    if cardb.get_record(car_num,"car") is None:
        return jsonify({"res":1,"err":"car num already removed"})

    cardb.remove_record(car_num,"car")
    return jsonify({"res":0, "data":"success delete"})