Beispiel #1
0
def server_create():
    obj = Server()
    obj.mass_assign(request.json)
    if not obj.is_valid:
        return jsonify(errors=obj.validation_errors), 422
    db.session.add(obj)
    db.session.commit()
    return jsonify(**obj.to_dict())
Beispiel #2
0
def server_create():
    obj = Server()
    obj.mass_assign(request.json)
    if not obj.is_valid:
        return jsonify(errors=obj.validation_errors), 422
    db.session.add(obj)
    db.session.commit()
    return jsonify(**obj.to_dict())
Beispiel #3
0
def server_index():
    ary = Server.all()
    return jsonarify(ary)
Beispiel #4
0
def server_index():
    ary = Server.all()
    return jsonarify(ary)
Beispiel #5
0
def server_index():
    ary = [remove_passwords_if_ineligible(obj) for obj in Server.all()]
    return jsonarify(ary)
Beispiel #6
0
def server_index():
    ary = [remove_passwords_if_ineligible(obj) for obj in Server.all()]
    return jsonarify(ary)