Esempio n. 1
0
File: app.py Progetto: MiqSA/estoque
 def get_product(product_id):
     header = {
             'access_token': request.headers['access_token'],
             "token_type": "JWT"
     }
     product = ProductController()
     response = product.get_product_by_id(product_id=product_id)
     return Response(json.dumps(response, ensure_ascii=False), mimetype='application/json'), response['status'], header
Esempio n. 2
0
 def get_product(product_id):
     header = {
         'access_token': request.headers['access_token'],
         'token_type': 'JWT'
     }
     product_controller = ProductController()
     response = product_controller.get_product_by_id(product_id)
     return Response(json.dumps(response, ensure_ascii=False),
                     mimetype='application/json',
                     status=response['status'],
                     headers=header)
Esempio n. 3
0
    def get_product(product_id):
        header = {
            "access_token": request.headers["access_token"],
            "token_type": "JWT"
        }

        product = ProductController()
        response = product.get_product_by_id(product_id=product_id)

        return (
            Response(json.dumps(response, ensure_ascii=False),
                     mimetype="application/json"),
            response["status"],
            header,
        )