Put client orders properly

This commit is contained in:
PCoder 2019-09-14 22:31:23 +05:30
parent 591eaadea2
commit 98a25361ea
1 changed files with 3 additions and 0 deletions

View File

@ -302,6 +302,9 @@ class ProductOrder(Resource):
"ordered_at": int(time.time()),
"product": product_obj,
}
client.put("/v1/user/{}/orders".format(
data['email']), json.dumps(order_obj),
value_in_json=True)
return {"message": "Order successful",
"order_details": order_obj}, 200
else: