def getAllPIN(): return peopleHandler().getAllPeopleInNeed()
def getOrdersByPerson(): if not request.args: return peopleHandler().getAllOrders() else: return peopleHandler().getOrdersByPersonInNeed(request.args)
def getOrdersBySupplier(): if not request.args: return peopleHandler().getAllOrders() else: return peopleHandler().getOrdersBySupplier(request.args)
def getProductsBySupplier(): if not request.args: return producthandler().getAllProducts() else: return peopleHandler().getProductsBySupplier(request.args)
def getSupplierByProduct(): if not request.args: return peopleHandler().getAllSuppliers() else: return peopleHandler().getSupplierByProduct(request.args)
def get_supplier_by_product_id(p_id): return peopleHandler().getSupplierByProduct(p_id)
def getAllAdmin(): return peopleHandler().getAllAdminstrators()
def get_account_by_username(): return peopleHandler().get_all_accounts()
def search_account_by_username(a_id): return peopleHandler().search_account_by_a_id(a_id)
def view_bankinfo_by_sid(s_id): if request.method == 'GET': return peopleHandler().get_bankinfo_by_SID(s_id) elif request.method == 'PUT': return peopleHandler().update_bankinfo(s_id, request.form)
def get_all_bank_info(): if request.method == 'GET': return peopleHandler().get_all_bank_info() elif request.method == 'POST': return peopleHandler().insert_bankinfo(request.form)
def get_all_users(): return peopleHandler().getAllUsers()
def addressChange(address_id): if request.method == 'PUT': return peopleHandler().updateAddresses(address_id, request.form) else: return jsonify(Error="Method not allowed."), 405
def getAllAddress(): return peopleHandler().getAllAddress()