Skip to content

Commit

Permalink
Merge branch 'release/1.0.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
taynarasene committed Apr 15, 2021
2 parents 8931d11 + 4882715 commit 123d9e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/controllers/carts.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def list_all_carts():

@app.route('/cart/<string:session_id>')
def list_cart_by_session(session_id):
# try:
try:
obj = [{
"session_id": session_id,
"cupom_apply": Carts.get_cupom(session_id),
Expand All @@ -40,8 +40,8 @@ def list_cart_by_session(session_id):
"products": json.loads(Carts.get_cart_product(session_id))
}]
return jsonify({'Carts': obj })
# except:
# return jsonify({'code': 404, 'message': f'carrinho {session_id} não encontrado' }), 404
except:
return jsonify({'code': 404, 'message': f'carrinho {session_id} não encontrado' }), 404

@app.route('/cart/<string:session_id>', methods=['POST'])
def created_cart(session_id):
Expand Down

0 comments on commit 123d9e1

Please sign in to comment.