Beispiel #1
0
def getAllReservetaions():
    if request.method == 'POST':
        return OrdersHandler().insertReservationJson(request.json)
    if request.method == 'GET':
        if request.args:
            return OrdersHandler().searchOrders(request.args)
        else:
            return OrdersHandler().getAllReservations()
    else:
        return jsonify(Error="Method not allowed"), 405
Beispiel #2
0
def getReservationByConsumerId(cid):
    if request.method == 'GET':
        return OrdersHandler().getReservationsByConsumerId(cid)
    else:
        return jsonify(Error="Method not allowed"), 405
Beispiel #3
0
def getReservationByType(type):
    if request.method == 'GET':
        return OrdersHandler().getReservationsByType(type)
    else:
        return jsonify(Error="Method not allowed"), 405
Beispiel #4
0
def getReservationsByKeyword(keyword):
    if request.method == 'GET':
        return OrdersHandler().getReservationsByKeyword(keyword)
    else:
        return jsonify(Error="Method not allowed"), 405
Beispiel #5
0
def getOrderById(oid):
    if request.method == 'GET':
        return OrdersHandler().getOrderById(oid)
    else:
        return jsonify(Error="Method not allowed"), 405