14 lines
		
	
	
		
			403 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			403 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from flask import Blueprint, jsonify, request
 | 
						|
from routes.utils import jwt_protect_blueprint
 | 
						|
import sipro.api.barcode
 | 
						|
 | 
						|
barcode_blueprint = jwt_protect_blueprint(Blueprint('barcode', __name__))
 | 
						|
 | 
						|
 | 
						|
@barcode_blueprint.get('/searchProducts')
 | 
						|
def search_product():
 | 
						|
    args = request.args
 | 
						|
    barcode = args.get('barcode')
 | 
						|
    response = sipro.api.barcode.get_products_by_barcode(barcode)
 | 
						|
    return response
 |