18 lines
		
	
	
		
			550 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			550 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from flask import Blueprint, jsonify, request
 | 
						|
from routes.utils import jwt_protect_blueprint
 | 
						|
import sipro.api.orders
 | 
						|
 | 
						|
orders_blueprint = jwt_protect_blueprint(Blueprint('orders', __name__))
 | 
						|
 | 
						|
 | 
						|
@orders_blueprint.get('/<int:order_id>')
 | 
						|
def get_order(order_id: int):
 | 
						|
    return jsonify(id=order_id)
 | 
						|
 | 
						|
 | 
						|
@orders_blueprint.get('/getBySupplierProductId')
 | 
						|
def get_orders_by_supplier_product_id():
 | 
						|
    args = request.args
 | 
						|
    supplier_product_id = args.get('supplierProductId')
 | 
						|
    return sipro.api.orders.get_orders_by_supplier_product_id(supplier_product_id)
 |