13 lines
379 B
Python
13 lines
379 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')
|
|
return sipro.api.barcode.get_products_by_barcode(barcode)
|